A, B, C = ( int(i) for i in input().split() )



if A <= C <= B:

  print('Yes')

elif B <= C <= A:

  print('Yes')

else:

  print('No')
A, B, C = ( int(i) for i in input().split() )



if A < C < B:

  print('Yes')

elif B < C < A:

  print('Yes')

else:

  print('No')
A, B, C = (int(i) for i in input().split())
if A <= C <= B:
    print("Yes")
elif B <= C <= A:
    print("Yes")
else:
    print("No")

A, B, C = (int(i) for i in input().split())
if A < C < B:
    print("Yes")
elif B < C < A:
    print("Yes")
else:
    print("No")

-if A <= C <= B: +if A < C < B: -elif B <= C <= A: +elif B < C < A: