a,b,c,d = map(int,input().split()) if a < b and c > d: print('YES') else: print('NO')