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())
print("Yes" if (c-a)*(c-b)>0 else "No")
a,b,c = map(int, input().split())
print("No" if (c-a)*(c-b)>0 else "Yes")
