a, b, c = list(map(int, input().split()))

if min(a, b) < c and c < max(a, b):

  print('Yes')

else:

  print('No')
a, b, c = list(map(int, input().split()))

if a <= c <= b or b <= c <= a:

    print('Yes')

else:

    print('No')

a, b, c = list(map(int, input().split()))
if min(a, b) < c and c < max(a, b):
    print("Yes")
else:
    print("No")

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

-if min(a, b) < c and c < max(a, b): +if a <= c <= b or b <= c <= a: