a = tuple(int(s) for s in input().split()) print("YES" if a[0] < a[1] and a[2] > a[3] else "NO")