N = int(input()) a,b,c = map(int,input().split()) if a==c: exit(print("No")) if ab and a>c: print("Yes") elif b==c: print("Yes") else: print("No")