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