a,b,c=list(map(int,input().split()));print(((a>c)-(b>c)and'Yes'or'No'))
a,b,c=list(map(int,input().split()));print(('NYoe s'[(c>a)^(c>b)::2]))
a, b, c = list(map(int, input().split()))
print(((a > c) - (b > c) and "Yes" or "No"))

a, b, c = list(map(int, input().split()))
print(("NYoe s"[(c > a) ^ (c > b) :: 2]))

-print(((a > c) - (b > c) and "Yes" or "No")) +print(("NYoe s"[(c > a) ^ (c > b) :: 2]))