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