import sys input=lambda: sys.stdin.readline().rstrip() a1,a2,a3,a4=map(int,input().split()) if a1a4: print("YES") else: print("NO")