There are three houses on a number line: House 1, 2 and 3, with coordinates A, B and C, respectively. Print `Yes` if we pass the coordinate of House 3 on the straight way from House 1 to House 2 without making a detour, and print `No` otherwise.
a, b, c = map(int, input().split())
if a <= b and b <= c:
  print("Yes")
elif c <= b and b <= a:
  print("Yes")
else:
  print("No")
a, b, c = map(int, input().split())
if a <= c <= b or b <= c <= a:
  print("Yes")
else:
  print("No")