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