import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines a, b, c, d = map(int, read().split()) print('YES' if a < b and c > d else 'NO')