input() a, b, c = map(int, input().split()) if a == c: print('No') elif a < c: print('Yes' if a < b else 'No') else: print('Yes' if b < a else 'No')