N = int(input()) A,B,C = map(int, input().split()) if (A>C)^(A>B) or A==C: print('No') else: print('Yes')