import sys def MI(): return map(int,sys.stdin.readline().rstrip().split()) a,b,c,d = MI() print('YES' if a < b and c > d else 'NO')