a = list(map(int, input().split())) print("YES" if a[0]a[3] else "NO")