import sys input = sys.stdin.readline from collections import * A = list(map(int, input().split())) if A[0]A[3]: print('YES') else: print('NO')