a1,a2,a3,a4 = map(int,input().split()) if a1 < a2 and a3 > a4: print('YES') else: print('NO')