import sys readline=sys.stdin.readline A=list(map(int,readline().split())) if A[0]A[3]: ans="YES" else: ans="NO" print(ans)