Problem:
 Score : 100 points    Problem Statement 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.      Constraints  0\leq A,B,C\leq 100  A , B and C are distinct integers.         Input Input is given from Standard Input in the following format:  A  B  C       Output 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.        Sample Input 1 3 8 5      Sample Output 1 Yes  We pass the coordinate 5 on the straight way from the house at coordinate 3 to the house at coordinate 8 .       Sample Input 2 7 3 1      Sample Output 2 No       Sample Input 3 10 2 4      Sample Output 3 Yes       Sample Input 4 31 41 59      Sample Output 4 No

Solution (Python):
import math
import sys
a,b,c = map(int,input().split())
if a < c and c < b:
    print("Yes")
elif b < c and c < a:
    print("Yes")
else:
    print("No")

Solution (Python):
a,b,c = map(int, input().split())

if (c-a)*(c-b) > 0:
  print('No')
else:
  print('Yes')

Solution (Python):
input = input()
a,b,c = [int(x) for x in input.split()]
if (c-a)*(c-b) < 0:
  print('Yes')
else:
  print('No')

Solution (Python):


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

if a<c<b or b<c<a:
    print('Yes')
else:
    print('No')

Solution (Python):
a = [int(item) for item in input().split()]
print("No" if a[2] in (max(a), min(a)) else "Yes")

Solution (Python):
a, b, c = map(int, input().split())

if a < c < b or b < c < a:
    print("Yes")
else:
    print("No")

Solution (Python):
a, b, c = map(int, input().split())

if a < c < b or b < c < a:
    print("Yes")
else:
    print("No")

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

Solution (Python):
list = list(map(int,input().split()))
if list[0] <= list[2] <= list[1] or list[0] >= list[2] >= list[1]:
  print("Yes")
else:
  print("No")

Solution (Python):



def main():
    a, b, c = map(int, input().split())

    if (a < c < b) or (b < c < a):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Solution (Python):
A,B,C = map(int,input().split())
if A < C < B or B < C < A:
  print("Yes")
else:
  print("No")

Solution (Python):
A,B,C =map(int,input().split())
if A < B:
  if A < C < B:
    print("Yes")
  else:
    print("No")
else:
  if B < C < A:
    print("Yes")
  else:
    print("No")

Solution (Python):
a, b, c = map(int,input().split())
if a > c > b or b > c > a :
  print('Yes')
else :
  print('No')

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

Solution (Python):
from_user=input()
coordinates_str=from_user.split(' ')
A=int(coordinates_str[0])
B=int(coordinates_str[1])
C=int(coordinates_str[2])

if C > A:
    if C < B:
        print('Yes')
    else:
        print('No')

if C < A:
    if C > B:
        print('Yes')
    else:
        print('No')

Solution (Python):
tmp_lst = input().split()

A, B, C = int(tmp_lst[0]), int(tmp_lst[1]), int(tmp_lst[2])

if A < C and C < B:
    print("Yes")
elif B < C and C < A:
    print("Yes")
else:
    print("No")

Solution (Python):
A, B, C = map(int, input().split())
if A < C < B or B < C < A:
    print("Yes")
else:
    print("No")

Solution (Python):
a, b, c = map(int, input().split())
print('Yes' if c > min(a, b) and c < max(a, b) else 'No')

Solution (Python):
A, B, C = map(int, input().split())
if (A - C) * (B - C) < 0:
	print('Yes')
else:
	print('No')

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

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime,random
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())

A,B,C = inpl()
if A < C < B or B < C < A:
    print('Yes')
else:
    print('No')

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

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

if a < c < b or a > c > b:
  print('Yes')
else:
  print('No')

Solution (Python):
a, b, c = map(int,input().split())
if a > c > b or b > c > a :
  print('Yes')
else :
  print('No')

Solution (Python):
A, B, C = map(int, input().split())
print(('No', 'Yes')[(A < C and C < B) or (B < C and C < A)])

Solution (Python):
inp = input().split(' ')
a = [int(s) for s in inp]
mi = min(a[:2])
ma = max(a[:2])
if mi <= a[2] <= ma:
  print('Yes')
else:
  print('No')

Solution (Python):
A,B,C =tuple(map(int,input().split()))
if A<C<B or A>C>B:
  print("Yes")
else:
  print("No")

Solution (Python):
a,b,c =[int(x) for x in input().split()]

if a < c < b or b < c < a:
    print("Yes")
else:
    print("No")

Solution (Python):
a,b,c = map(int, input().split())

if a < b :
  ans = 'Yes' if a < c and c < b else 'No'

if a > b :
  ans =  'Yes' if b < c and c < a else 'No'

print(ans)

Solution (Python):
a,b,c=map(int,input().split())
if a<c and b>c:
    print('Yes')
elif a>c and b<c:
    print('Yes')
else:
    print('No')

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

Solution (Python):
a, b, c = map(int, input().split())
l = [i for i in range(min(a, b), max(a, b) + 1)]
if c in l:
    print('Yes')
else:
    print('No')

Solution (Python):
A,B,C = map(int,input().split())
if A<C<B or B<C<A:
  print('Yes')
else:
  print('No')

Solution (Python):
pos_house = [int(x) for x in input().split()]

if pos_house[0] < pos_house[2] < pos_house[1] or \
    pos_house[0] > pos_house[2] > pos_house[1]:
    print("Yes")
else:
    print("No")

Solution (Python):
import math
import sys
a,b,c = map(int,input().split())
if a < c and c < b:
    print("Yes")
elif a > c and c > b:
    print("Yes")
else:
    print("No")

Solution (Python):
a, b, c = map(int, input().split())
if a<c & c<b:
  print('Yes')
elif b<c & c<a:
    print('Yes')
else:
  print('No')

Solution (Python):
i = input().split()
n1 = max(int(i[0]),int(i[1]))
n2 = min(int(i[0]),int(i[1]))
aa = list(range(n2,n1))



ans = ('Yes' if int(i[2]) in aa else 'No')
print(ans)

Solution (Python):
inputs = list(map(int, input().split(" ")))
print('Yes' if (inputs[0] < inputs[2] < inputs[1] or inputs[1] < inputs[2] < inputs[0]) else 'No')

Solution (Python):
A, B, C = list(map(int, input().split()))
if A > B:
    if A > C > B:
        print("Yes")
    else:
        print("No")
else:
    if B > C > A:
        print("Yes")
    else:
        print("No")

Solution (Python):
A, B, C = map(int, input().split())
if min(A, B) <= C <= max(A, B):
    print("Yes")
else:
    print("No")

Solution (Python):
x = list(map(int, input().split()))
if x[0]<x[2]<x[1]:
    print("Yes")
elif x[1]<x[2]<x[0]:
    print("Yes")
else:
    print("No")

Solution (Python):
a, b, c = map(int, input().split())

if (a < c and c < b) or (b < c and c < a):
    print("Yes")
else:
    print("No")

Solution (Python):
A, B, C = map(int, input().split())


def main():
    if A < C < B:
        return "Yes"
    elif A > C > B:
        return "Yes"
    else:
        return "No"

print(main())

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

Solution (Python):
a, b, c = map(int, input().split(" "))
if sorted([a,b])[0] < c and c < sorted([a,b])[1]:
    print("Yes")
else:
    print("No")

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

Solution (Python):
a, b, c = map(int, input().split())  

if min(a, b) < c < max(a, b):
    print('Yes')
else:
    print('No')

Solution (Python):
A, B, C= map(int, input().split())
if A<C and C<B:
  print("Yes")
elif B<C and C<A:
  print("Yes")
else:
  print("No")

Solution (Python):
a, b, c = map(int, input().split())
if (b-c)*(c-a) >= 0:
    print('Yes')
else:
    print('No')

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

Solution (Python):
a,b,c=map(int,input().split())
if a<b:
	if a<c and c<b:
		print("Yes")
	else:
		print("No")
elif b<a:
	if b<c and c<a:
		 print("Yes")
	else:
		 print("No")
else:
	 print("No")

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

Solution (Python):
i = list(map(int,input().split()))

if(i[0] < i[1]):
    if(i[0] < i[2] and i[2] < i[1]):
        print("Yes")
    else:
        print("No")

elif(i[0] > i[1]):
    if(i[1] < i[2] and i[2] < i[0]):
        print("Yes")
    else:
        print("No")

else:
    print("No")

Solution (Python):
a,b,c=map(int,input().split())

if (c-b)*(a-c)>0:
  print("Yes")
else:
  print("No")

Solution (Python):
a,b,c = map(int, input().split())
if a < b:
    if a < c and c < b:
        print("Yes")
    else:
        print("No")
else:
    if a > c and c > b:
        print("Yes")
    else:
        print("No")

Solution (Python):
print("YNeos"[(lambda x:x[2]>max(x[0],x[1])or x[2]<min(x[0],x[1]))(list(map(int,input().split())))::2])

Solution (Python):
a,b,c = map(int,input().split())

if (a < c and c < b) or (b < c and c < a):
	print("Yes")
else:
	print("No")

Solution (Python):
A,B,C =map(int, input().split())
print("Yes") if min(A, B)<C<max(A,B) else print("No")

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

Solution (Python):
A, B, C = map(int, input().split())

print('Yes' if min(A,B) < C and C < max(A,B) else 'No')

Solution (Python):
l = [int(i) for i in input().split()]
l_sorted = sorted(l)
if l[2] == l_sorted[1]:
  print('Yes')
else:
  print('No')

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

Solution (Python):
a,b,c=map(int,input().split())
print("Yes" if a>b and a>c>b or b>a and b>c>a else "No")

Solution (Python):
a = list(map(int, input().split()))

c = a[2]

a.sort()

if a[1] == c:
    print('Yes')
else:
    print('No')

Solution (Python):


data = list(map(lambda x: int(x), input().split(' ')))

if data[0] < data[2] < data[1] or data[0] > data[2] > data[1]:
    print("Yes")
else:
    print("No")

Solution (Python):
a,b,c = map(int,input().split())
if a < c < b:
        ans = "Yes"
elif b < c < a:
        ans = "Yes"
else:
        ans = "No"
print(ans)

Solution (Python):
a,b,c = map(int,input().split())
print('Yes' if a<c<b or a>c>b else 'No')

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

Solution (Python):
A,B,C = map(int,input().split())

if A < C and C < B:
    print('Yes')
elif B < C and C < A:
    print('Yes')
else:
    print('No')

Solution (Python):
A, B, C = map(int,input().split())
for i in range(min(A,B),max(A,B),1):
    if C == i:
        print("Yes")
        exit()
print("No")

Solution (Python):
a,b,c=map(int,input().split())
ab=[i for i in range(min(a,b),max(a,b)+1)]
print('Yes' if c in ab else 'No')

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

Solution (Python):
a = list(map(int,input().split()))

if (a[0] < a[2] and a[2] < a[1] ) or (a[0] > a[2] and a[2] > a[1]):
  print("Yes")
else:
  print("No")

Solution (Python):
a,b,c=map(int,input().split())
if max(a,b)>=c>=min(a,b):
  print('Yes')
else:
  print('No')

Solution (Python):


import sys
import copy

sys.setrecursionlimit(1000000)





A, B, C = map(int, input().split())

if A > B:
    A, B = B, A

print("Yes" if A < C and C < B else "No")

Solution (Python):
if __name__ == '__main__':
  a,b,c = map(int, input().split())
  if(a>b):
    a,b = b,a
  if(c > a and c < b):
    print("Yes")
  else:
    print("No")

Solution (Python):
ipt = list(map(int, input().split()))
if min(ipt[0], ipt[1]) < ipt[2] < max(ipt[0], ipt[1]):
    print("Yes")
else:
    print("No")

Solution (Python):
a,b,c = map(int,input().split())
if a > b:
	A = a
	a = b
	b = A

yoru = 1    
if a < c and b > c:
	yoru = 1
else:
	yoru = 0
if yoru == 1:
	print("Yes")
else:
	print("No")

Solution (Python):
a,b,c = map(int, input().split())
print("Yes" if (a-c)*(b-c) < 0 else "No")

Solution (Python):
a,b,c=map(int,input().split())

if a<c<b or b<c<a:
    print("Yes")
else:
    print("No")

Solution (Python):
def main():
    A, B, C = map(int, input().split())
    if A <= C <= B or B <= C <= A:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Solution (Python):
a, b, c = (int(x) for x in input().split())
if ((a < c) and (b > c)) or ((a > c) and (b < c)):
    print('Yes')
else:
    print('No')

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

Solution (Python):
def on_the_way(A: int, B: int, C: int)->bool:
    if A > B:
        A, B = B, A
    return A < C and C < B


if __name__ == "__main__":
    A, B, C = map(int, input().split())

    yes = on_the_way(A, B, C)
    print('Yes' if yes else 'No')

Solution (Python):
a, b, c = map(int, input().split())

if a < c < b:
    print('Yes')
elif b < c < a:
    print('Yes')
else:
    print('No')

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

Solution (Python):
a, b, c = [int(i.strip()) for i in input().split()]
if (a < c and c < b) or (a > c and c > b):
  print("Yes")
else:
  print("No")

Solution (Python):
A,B,C = [int(x) for x in input().split()]

if min(A, B)<C and C<max(A,B):
    print('Yes')
else:
    print('No')

Solution (Python):
def main():
    A,B,C = [int(x) for x in input().split()]
    if A < C < B:
        print('Yes')
    elif B < C < A:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

Solution (Python):
a,b,c = (int(i) for i in input().split())
if (a-c)*(b-c)<0: print("Yes")
else: print("No")

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

Solution (Python):
a, b, c = list(map(int, input().split()))
print("Yes" if (c - a) * (c - b) <= 0 else "No")

Solution (Python):
a, b, c = map(int,input().split())

if a < b:
    if c < b and c > a:
        print('Yes')
    else:
        print('No')

else:
    if c > b and c < a:
        print('Yes')
    else:
        print('No')

Solution (Python):
A, B, C = map(int, input().split())
print('Yes' if A < C < B or B < C < A else 'No')

Solution (Python):
a, b, c = map(int,input().split())

if a < c < b or a > c > b:
    print("Yes")
else:
    print("No")

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

Solution (Python):
a, b, c = map(int, input().split())

if (a < c and c < b) or (b < c and c < a):
    print('Yes')
else:
    print('No')

Solution (Python):
A, B, C = map(int, input().split())
if A<C<B or B<C<A:
    print('Yes')
else:
    print('No')

Solution (Python):
A,B,C=map(int,input().split())
if A<C<B or B<C<A:
    print("Yes")
else:
    print("No")

Solution (Python):
A,B,C = map(int,input().split(" "))

if B>=A:
    for i in range(A,B):
        if i == C:
            print("Yes")
            exit()
else:
    for i in range(B,A):
        if i == C:
            print("Yes")
            exit()


print("No")

Solution (Python):
A,B,C = map(int,input().split())

if A > C and B < C:
    print('Yes')
elif B > C and A < C:
    print('Yes')
else:
    print('No')

Solution (Python):

"""
Created on Sun Apr 21 13:52:24 2019

@author: Yamazaki Kenichi
"""

A,B,C = map(int,input().split())

if A < C and C < B:
    print('Yes')
elif A > C and C > B:
    print('Yes')
else:
    print('No')

Solution (Python):
a,b,c = map(int,input().split(" "))
if c > a and c < b:
  print("Yes")
elif c < a and c > b:
  print("Yes")
else:
  print("No")

Solution (Python):
a, b, c = map(int, input().split())

if a < c < b:
    print("Yes")
elif b < c < a:
    print("Yes")
else:
    print("No")

Solution (Python):
A, B , C = map(int, input().split())
if (A <  C and C < B) or (B < C and C < A):
    print('Yes')
else:
    print('No')

Solution (Python):
a, b, c = map(int, input().split())

if a > b:
	a, b = b, a

if a < c < b:
	print("Yes")
else:
	print("No")

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

Solution (Python):
A, B, C = [int(x) for x in input().split()]
if min(A, B) < C < max (A, B):
  print('Yes')
else:
  print('No')

Solution (Python):
a,b,c=map(int,input().split())
print(['No','Yes'][a<=c<=b or b<=c<=a])

Solution (Python):
a, b, c = map(int, input().split())

if (a < c and c < b) or (b < c and c < a):
	print('Yes')
else:
	print('No')

Solution (Python):


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

if b < c and c < a:
    print('Yes')

elif a < c and c < b:
    print('Yes')

else:
    print('No')

Solution (Python):
a, b, c = [int(i) for i in input().split(" ")]

if (a < c and c < b) or (b < c and c < a):
    print("Yes")
else:
    print("No")

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

Solution (Python):
A, B, C = map(int, input().split())

if min(A, B) < C and C < max(A, B):
    print('Yes')
else:
    print('No')

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

Solution (Python):
A, B, C = list(map(int, input().split()))

if (A < C and C < B) or (B < C and C < A):
    print('Yes')
else:
    print('No')

Solution (Python):
A,B,C=map(int,input().split());print(["No","Yes"][(C>A)^(C>B)])

Solution (Python):
a, b, c = map(int, input().split())
ans = "No"
if a < c and c < b or b < c and c < a:
    ans = "Yes"
print(ans)

Solution (Python):
A, B, C = list(map(int, input().split()))
print("Yes" if (C-A > 0) ^ (C-B > 0)  else "No")

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

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

Solution (Python):
a,b,c=map(int,input().split())
if (c-a)*(c-b)<0:
    print('Yes')
else:
    print('No')

Solution (Python):

intA, intB, intC = map(int, input().split())

if intA < intC < intB or intA > intC > intB:
    print('Yes')
else:
    print("No")

Solution (Python):

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

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

Solution (Python):
A,B,C = map(int, input().split())
 
if A < C and C < B:
    print('Yes')
elif A > C and C > B:
    print('Yes')
else:
    print('No')

Solution (Python):
A,B,C = map(int, input().split())

if A < C and C < B:
    print('Yes')
elif A > C and C > B:
    print('Yes')
else:
    print('No')

Solution (Python):
a,b,c = map(int,input().split())
x = [ [a,0], [b,1], [c,2] ]
x = sorted(x)
if x[1][1] == 2:
    print("Yes")
else:
    print("No")

Solution (Python):
A, B, C = [int(i) for i in input().split()]
if A < C < B or B < C < A:
    print("Yes")
else:
    print("No")

Solution (Python):
a, b, c = map(int, input().split())

if (a < c < b) or (a > c > b):
  print("Yes")
else:
  print("No")

Solution (Python):



[A, B, C] = list(map(int,input().split()))
if max(A,B) >= C and min(A, B) <= C:
    print("Yes")
else:
    print("No")

Solution (Python):
A, B, C = map(int, input().split())
print('Yes' if min((A, B)) <= C <= max((A, B)) else 'No')

Solution (Python):
a,b,c = (int(i) for i in input().split())
if c > a and c > b or c < a and c < b:
  print('No')
else:
  print('Yes')

Solution (Python):
a, b, c = list(map(int, input().split()))
print("YNeos"[not (a < c < b or b < c < a) :: 2])

Solution (Python):
A,B,C=map(int,input().split())
if A<C<B or B<C<A:
    print("Yes")
else:
    print("No")

Solution (Python):
a,b,c=map(int,input().split())
print(' YNeos'[a<c<b or b<c<a::2])

Solution (Python):
a, b, c = map(int, input().split())
if min([a, b]) < c < max([a, b]):
    print("Yes")
else:
    print("No")

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

Solution (Python):
a, b, c = map(int, input().split())
print("YNeos"[not(a<=c<=b or b<=c<=a)::2])

Solution (Python):
A,B,C=map(int,input().split())
if A<C<B or A>C>B:
    print('Yes')
else:
    print('No')

Solution (Python):
a,b,c=map(int,input().split());print((a>c)-(b>c)and'Yes'or'No')

Solution (Python):
a,b,c=map(int,raw_input().split())
if a<c<b or b<c<a:
  print 'Yes'
else:
  print 'No'

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

Solution (Python):
a, b, c = [int(i) for i in input().split()]
print('Yes' if min(a, b) < c < max(a, b) else 'No')

Solution (Python):
a = list(map(int, input().split()))
if a[0] <= a[2] <= a[1] or a[1] <= a[2] <= a[0]:
  print("Yes")
else:
  print("No")

Solution (Python):
x, y, z = map(int, input().split())
print('Yes') if (x - z) * (y - z) < 0 else print('No')

Solution (Python):
A = list(map(int, input().split()))

if (A[0] < A[2] < A[1]) or (A[1] < A[2] < A[0]):
    print("Yes")
else:
    print("No")

Solution (Python):


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

d = a < c
e = b < c

if d != e:
    print("Yes")
else:
    print("No")

Solution (Python):
A,B,C = map(int, input().split())

if (min(A,B) < C) and (max(A,B) > C):
    print('Yes')
else:
    print('No')

Solution (Python):
A,B,C=map(int,input().split())
if A<C<B:
  print('Yes')
elif B<C<A:
  print('Yes')
else:
  print('No')

Solution (Python):
if __name__ == "__main__":
    ABC = input().split(" ")
    x = [int(x) for x in ABC]

    if (x[0]<x[2] and x[2]<x[1]) or (x[0]>x[2] and x[2]>x[1]) :
        print("Yes")
    else:
        print("No")

Solution (Python):
A,B,C=map(int,input().split())
if (A<C and C<B) or (B<C and C<A):
	print("Yes")
else:
	print("No")

Solution (Python):
a,b,c=map(int,input().split())
if (a<c and b>c) or (a>c and b<c):
  print('Yes')
else:
  print('No')

Solution (Python):
A, B, C = map(int, input().strip().split(' '))
message = ''
if A > B:
  message = 'Yes' if A > C > B else 'No'
else:
  message = 'Yes' if B > C > A else 'No'
print(message)

Solution (Python):
A, B, C = map(int, input().split())

if A < C < B or B < C < A:
    print("Yes")
else:
    print("No")

Solution (Python):
a = input()
b = list(map(int, a.split()))
if b[0] <= b[2] <= b[1]:
  print('Yes')
  
elif b[1] <= b[2] <= b[0]:
  print('Yes')
  
else:
  print('No')

Solution (Python):
a, b, c = map(int, input().split())
print('Yes' if min(a, b) <= c <= max(a, b) else 'No')

Solution (Python):
a, b, c =[int (x) for x in input().split()]
if (c > a and c < b) or (c < a and c > b):
    print ("Yes")
else:
    print ("No")

Solution (Python):
print((lambda A,B,C:'Yes'if C in range(*sorted([A,B]))else 'No')(*map(int,input().split())))

Solution (Python):

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

Solution (Python):
A, B, C = map(int, input().split())

if (A < C and B > C) or (A > C and B < C):
    print('Yes')
else:
    print('No')

Solution (Python):
a,b,c = map(int, input().split())
if ((a<c)&(c<b))|((a>c)&(c>b)):
  print ("Yes")
else:
  print("No")

Solution (Python):
A,B,C=map(int,input().split())
A,B=sorted([A,B])
if C in [i for i in range(A,B)]:
    print("Yes")
else:
    print("No")

Solution (Python):
a,b,c=map(int,input().split());print((a>c)-(b>c)and'Yes'or'No')

Solution (Python):
A,B,C=map(int,input().split())
if (C-A)*(C-B)<0:
  print("Yes")
else:
  print("No")

Solution (Python):
a,b,c=map(int,input().split())
print(['No','Yes'][a<=c<=b or b<=c<=a])

Solution (Python):
import math

a,b,c = raw_input().split()

a = int(a)
b = int(b)
c = int(c)
if min(a,b) < c and max(a,b) > c:
    print "Yes"
else:
    print "No"

Solution (Python):
a, b, c = map(int, input().split())

p_min = min(a, b)
p_max = max(a, b)

if p_min <= c <= p_max:
    print('Yes')
else:
    print('No')

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

Solution (Python):
A, B, C = map(int, input().split())
  
if A < C < B:
    print('Yes')
elif B < C < A:                                                                     
    print('Yes')
else:
    print('No')

Solution (Python):
inpl = lambda: map(int,input().split())
A, B, C = inpl()
if A < C < B or B < C < A:
  print('Yes')
else:
  print('No')

Solution (Python):
A, B, C = map(int, input().split())

if(A<C and C<B) or (B<C and C<A):
    print('Yes')
else:
    print('No')

Solution (Python):
A, B, C = map(int, input().split())

if (A-C) * (B-C) < 0:
    print('Yes')
else:
    print('No')

Solution (Python):
def main():
    a, b, c = [int(abc) for abc in input().split(" ")]

    if a < c < b:
        print("Yes")

    elif b < c < a:
        print("Yes")

    else:
        print("No")


if __name__ == "__main__":
    main()

Solution (Python):
A, B, C = map(int, input().split())
if A<C<B or B<C<A:
  print('Yes')
else:
  print('No')

Solution (Python):
A,B,C = list(map(int, input().split()))

if (A-C)*(B-C) < 0:
    print('Yes')
else:
    print('No')

Solution (Python):
a,b,c = map(int, input().split())
print("No" if (c-a)*(c-b)>0 else "Yes")

Solution (Python):
A,B,C=map(int,input().split())
if min(A,B)<=C<=max(A,B):
    print("Yes")
else:
    print("No")

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

Solution (Python):
A,B,C = list(map(int,input().split()))
if A<C<B or B<C<A:
    print("Yes")
else:
    print("No")

Solution (Python):
a=list(map(int,input().split()))
b=[]
b.append(a[0])
b.append(a[1])
b.sort()
if a[2]<=b[0]:
    print('No')
elif b[1]<=a[2]:
    print('No')
else:
    print('Yes')

Solution (Python):
a, b, c = input().split()
if (int(a) < int(c) and int(c) < int(b)) or (int(b) < int(c) and int(c) < int(a)):
  print('Yes')
else:
  print('No')

Solution (Python):
import sys
         
args = list(map(int, input().split()))
             
if (args[0] < args[2] and args[2] < args[1]) or (args[1] < args[2] and args[2] < args[0]):
    print("Yes")
else:
    print("No")

Solution (Python):
a,b,c = list(map(int,input().split(" ")))

if((a>b and b<c<a) or (a<b and b>c>a)):
    print("Yes")
else:
    print("No")

Solution (Python):
r_str = input()
r_str = r_str.split()
r = [int(s) for s in r_str]
a = 'Yes'
 
if r[0] <= r[1]:
    if r[0] <= r[2] and r[2] <= r[1]:
        a = 'Yes'
    else:
        a = 'No'
else:
    if r[1] <= r[2] and r[2] <= r[0]:
        a = 'Yes'
    else:
        a = 'No'
 
print(a)

Solution (Python):
A, B, C = map(int, input().split())
if A < C < B:
    print('Yes')
elif B < C < A:
    print('Yes')
else:
   print('No')

Solution (Python):
a,b,c = map(int,input().split())
if a < b and a < c and b > c:
    print('Yes')
elif a > b and a > c and b < c:
    print('Yes')
else:
    print('No')

Solution (Python):
a,b,c = map(int, input().split())
if a <= c and c <= b:
	print("Yes")
elif b <= c and c <= a:
	print("Yes")
else:
	print("No")

Solution (Python):
a,b,c = (int(i) for i in input().split())

if (a < c and c < b):
  print("Yes")
elif (b < c and c < a):
  print("Yes")
else:
  print("No")

Solution (Python):
a,b,c = map(int,input().split())

if a < c < b:
  print('Yes')
elif b < c < a:
  print("Yes")
else:
  print("No")

Solution (Python):
def main():
    A, B, C = map(int, input().split())
    if C < min(A, B) or max(A, B) < C:
        print("No")
    else:
        print("Yes")
main()

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

Solution (Python):
import sys
str = input().split()

str[0] = int(str[0])
str[1] = int(str[1])
str[2] = int(str[2])

if str[0] < str[2]:
  if str[1] > str[2]:
    print('Yes')
    exit(0)

if str[0] > str[2]:
  if str[1] < str[2]:
    print('Yes')
    exit(0)
print('No')

Solution (Python):
a, b, c = map(int, input().split())

if a > b:
    a, b = b, a
if a < c and c < b:
    print('Yes')
else:
    print('No')

Solution (Python):
vals = [int(i) for i in raw_input().split()]
print ("No" if vals[2] in (max(vals), min(vals)) else "Yes")

Solution (Python):
import sys

def solve(a, b, c):
    if a > c > b or a < c < b:
        return 'Yes'
    return 'No'

if __name__ == '__main__':

    a, b, c = map(int, sys.stdin.readline().strip().split(" "))
    ans = solve(a, b, c)
    print ans

Solution (Python):
x1, x2, x3 = map(int, input().split())
if (x1-x3)*(x2-x3)<0:
    print("Yes")
else:
    print("No")

Solution (Python):


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

if a < c and c < b:
    print("Yes")

elif b < c and c < a:
    print("Yes")

else:
    print("No")

Solution (Python):
l = list(map(int, input().split()))
 
if l[0] < l[2] and l[1] < l[2]:
 print('No')
elif l[2] < l[0] and l[2] < l[1]:
 print('No')
else:
 print('Yes')

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

Solution (Python):



il = list(map(int,input().split()))


if il[1] <= il[2] <= il[0] or il[0] <= il[2] <= il[1]:
    
    print('Yes')
else:
    print('No')

Solution (Python):
A, B, C = map(int,input().split())
if (A < C) and (C < B):
    print('Yes')
elif (B < C) and (C < A):
    print('Yes')
else:
    print('No')

Solution (Python):
points = input()
points = points.split(" ")
a = int(points[0])
b = int(points[1])
c = int(points[2])

if (a < c < b) or (a > c > b):
    print("Yes")
else:
    print("No")

Solution (Python):


import sys
input = sys.stdin.readline

def io_generator():
	return input()


def m2(a,b,c):
	min_pos=min(a,b)
	max_pos=max(a,b)
	return (min_pos<=c) and (c<=max_pos)
	
def main(io):
	a,b,c= map(int, io().split())
	return 'Yes' if m2(a,b,c) else 'No'



if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

Solution (Python):
s = input().split(" ")
a = int(s[0])
b = int(s[1])
c = int(s[2])
ans = "No"
if a>b:
    if b>c:
        ans="No"
    elif b<c:
        if a>c:
            ans="Yes"
        else:
            ans="No"
else:
    if b<c:
        ans="No"
    elif b>c:
        if a<c:
            ans="Yes"
        else:
            ans="No"
    
print(ans)

Solution (Python):
a = input().split(' ')
h1 = int(a[0])
h2 = int(a[1])
h3 = int(a[2])
 
if h1 < h3 and h3 < h2:
  print('Yes')
else:
  if h2 < h3 and h3 < h1:
    print('Yes')
  else:
    print('No')

Solution (Python):
l = list(map(int, input().split()))

A = l[0]
B = l[1]
C = l[2]

if A >= C >= B or A <= C <= B :
    print('Yes')
else:
    print('No')

Solution (Python):
A,B,C=map(int,input().split())
if (A<C and B>C) or (B<C and A>C):
	print('Yes')
else:
	print('No')

Solution (Python):
s = input()
a, b, c = [int(_) for _ in s.split()]
a, b, c = [_-a for _ in (a, b, c)]

if b * c > 0 and abs(b) > abs(c):
    print("Yes")
else:
    print("No")

Solution (Python):
input_str = input()
homes = input_str.split(" ")
for i, home in enumerate(homes):
    homes[i] = int(home)
if ((homes[2] - homes[1]) * (homes[2] - homes[0]) < 0):
    print("Yes")
else:
    print("No")

Solution (Python):
input = input()
splited = input.split(" ")
a = int(splited[0])
b = int(splited[1])
c = int(splited[2])
if a < c < b:
  print("Yes")
elif a > c > b:
  print("Yes")
else:
  print("No")