A, B, C, D = map(int, input().split()) print(['NO', 'YES'][A < B and C > D])