n = int(input()) a,b,c = map(int,input().split()) if a < b: if c <= a: print("No") else: print("Yes") else: if c >= a: print("No") else: print("Yes")