Contrastive Representations for Temporal Reasoning