Reason from Context with Self-supervised Learning