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):
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] = [int(x) for x in input().split()]
if (a-c)*(b-c)<0:
  print("Yes")
else:
  print("No")

Solution (Python):
a, b, c  = [int(i) for i in 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 or a > c > b:
    print('Yes')
else:
    print('No')

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

if A < B:
    l = A
    r = B
else:
    l = B
    r = A
    
if l < C and r > C:
    print('Yes')
else:
    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):
a,b,c = list(map(int,input().split()))

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

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

if l[0]<= l[2] and l[2]<= l[1]:
	print('Yes')
elif l[1] <= l[2] and l[2] <= l[0]:
	print('Yes')
else:
	print('No')

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

A=int(A)
B=int(B)
C=int(C)

AB=abs(A-B)
ACB=abs(A-C)+abs(C-B)

if AB==ACB:
	print('Yes')
else:
	print('No')

Solution (Python):
data =[int(s) for s in input().split()]

if data[0] <= data[1]:
  if data[1] >= data[2] and data[0] <= data[2]:
    print("Yes")
  else:
    print("No")
else:
  if data[1] <= data[2] and data[0] >= data[2]:
    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):
ABC = input().split()
list_ABC = list(ABC)
A = int(list_ABC[0])
B = int(list_ABC[1])
C = int(list_ABC[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 > b and b > c and a > c:
    print('No')
if a > c and a > b and c > b:
    print('Yes')
elif b > a and b > c and a > c:
    print('No')
elif b > c and c > a and b > a:
    print('Yes')
elif c > a and c > b and a > b:
    print('No')
elif  c > b and c > a and b > a:
    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 a > b:
    tmp = a
    a = b
    b = tmp
for i in range(a, b):
    if i == c:
        print("Yes")
        exit()
print("No")

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

Solution (Python):
import sys


def main():
    A, B, C = [int(x) for x in sys.stdin.readline().split()]
    if A < B and A < C and C < B:
        print("Yes")
    elif A > B and A > C and C > B:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

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 c>=a:
    if b>=c:
        print("Yes")
    else:
            print("No")
else:
    if b<=c:
        print("Yes")
    else:
            print("No")

Solution (Python):
inputs = list(map(int,input().split()))
if inputs[0] < inputs[2] < inputs[1] or inputs[0] > inputs[2] > inputs[1]:
    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())
z=0

if a<b:
    if a<c:
        if b>c:
            z=1
else:
    if a>c:
        if b<c:
            z=1

if z==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())

print("Yes") if abs(A-C)<=abs(A-B) and (A<C<B or A>C>B) 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 < B) or (A > C > B):
    print('Yes')
else:
    print('No')

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

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

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

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

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

Solution (Python):
inp=input()

line=inp.split(" ")

a=int(line[0])
b=int(line[1])
c=int(line[2])

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 C > A and C < B or C < A and C > B:
    print('Yes')
else:
    print('No')

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

print(ans)

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())
if A>C & C>B:
	print("Yes")
if B>C & C>A:
   	print("Yes")
if C>A & A>B:
	print("No")
if B>A & A>C:
	print("No")
if A>B & B>C:
	print("No")
if C>B & B>A:
	print("No")

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

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

Solution (Python):
a,b,c= input().split()
array = sorted([int(a),int(b),int(c)])
print(["No","Yes"][array.index(int(c))== 1])

Solution (Python):
A, B, C = (int(i) for i in 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())
last=max(A,B)
first=min(A,B)
if C <= last and first <= C:
	print("Yes")
else:
	print("No")

Solution (Python):
a, b, c = [int(n) for n 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())

road = list(range(A + 1, B)) if A < B else list(range(B + 1, A))
if C in road:
    print("Yes")
else:
    print("No")

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

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

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

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

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

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

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

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

Solution (Python):
import sys

def main():
    argv = input().split()
    A = int(argv[0])
    B = int(argv[1])
    C = int(argv[2])
    print(judge(A, B, C))

def judge(A, B, C):
    if (A < C and C < B) or (C < A and B < C):
        return 'Yes'
    else:
        return 'No'

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
a, b, c = map(int, input().split())
 
if a > b:
  for i in range(b, a):
    if i == c:
      print('Yes')
      sys.exit(0)
else:
  for i in range(a, b):
    if i == c:
      print('Yes')
      sys.exit(0)

print('No')

Solution (Python):
a, b, c = map(int, input().split())
list_1 = [a,b,c]
m = min(list_1)
M = max(list_1)
if (c!=m) and (c!=M):
    print('Yes')
else:
    print("No")

Solution (Python):
A,C,B=map(int,input().split())
if A<B and B<C:
  print("Yes")
elif C<B and B<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 b<=c<=a:
  print("Yes")
else:
  print("No")

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

Solution (Python):
N = [int(i) for i in input().split()]
M = (N[0]-N[2])*(N[1]-N[2])
if  M > 0:
    print("No")
else:
    print("Yes")

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

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):
data = input()
split = data.split(' ')
a = int(split[0])
b = int(split[1])
c = int(split[2])

if b < a:
    a, b = b, a

for i in range(a, b):
    judge = 'No'
    if i == c:
        judge = 'Yes'
        break

print(judge)

Solution (Python):
x,y,z=map(int,input().split())
if x<y:
    if y>z:
        if z>x:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
elif x>y:
    if y<z:
        if x>z:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Solution (Python):
def check_between(a,b,c):
    if  (b < c) and (c < a) :
        print('Yes')
    elif (a < c) and (c <b) :
        print('Yes')
    else:
        print('No')

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

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

Solution (Python):
A, B, C = (int(i) for i in 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 (B - C) * (C - A) > 0:
    print("Yes")
else:
    print("No")

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

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

upper= max(a[0],a[1])
lower= min(a[0],a[1])

if upper >= a[2] and lower<= a[2]:
  print "Yes"
else:
  print "No"

Solution (Python):
import sys
 
inp = map(int, raw_input().strip().split(" "))
 

if inp[0] > inp[2] and inp[2] > inp[1]:
    print("Yes")
elif inp[1] > inp[2] and inp[2] > inp[0]:
    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 a > c > b:
        print('Yes')
    else:
        print('No')

Solution (Python):
a,b,c = map(int,input().split())
rab = range(a+1,b+1)
rba = range(b+1,a+1)
if c in rab or c in rba:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
import sys
a = []
for l in sys.stdin:
    a.append(l)

zahyou = [int(x) for x in a[0].split()]
a, b, c = zahyou
if max(zahyou) == c or min(zahyou) == c:
    print("No")
else:
    print("Yes")

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):
pos_in = input().split()
pos = [int(s) for s in pos_in]

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

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

Solution (Python):
import sys

def main(inp):
  a,b,c=map(int,next(inp).split())
  if((a-c)*(b-c)<0): print("Yes")
  else: print("No")
    
main(sys.stdin)

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

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

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

if(A < C and C < B) or (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(a>=c & c>=b):
    print('Yes')
else:
    print('No')

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

a != b
b != c
c != a

1 <= a <= 100
1 <= b <= 100
1 <= c <= 100

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

Solution (Python):
abc=list(map(int,input().split()))
if max(abc)==abc[0] and min(abc)==abc[1] or max(abc)==abc[1] and min(abc)==abc[0]:
  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):
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 A < C < B:
    print('Yes')
elif B < C < A:
    print('Yes')
else:
    print('No')

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

for i in range(len(in_list)):
    in_list[i] = int(in_list[i])

if max(in_list) == in_list[2] or min(in_list) == in_list[2]:
    print("No")
else:
    print("Yes")

Solution (Python):

a, b, c = map(int,(input().split()))
t = (c - a) / (b - a)
if 0 < t < 1:
    print('Yes')
else:
    print('No')

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

if C >= A and 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):
import sys

input = sys.stdin.readline
a, b, c = map(int, input().split())
if max(a, b) > c and c > min(a, b):
    print('Yes')
else:
    print('No')

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

Solution (Python):
def main():
    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')
main()

Solution (Python):
import numpy as np
huga = list(map(int, input().split()))
a=huga[0]
b=huga[1]
c=huga[2]
if a>b:
  x=a
  a=b
  b=x
        
      
if a<c and b>c:
  print("Yes")
else:
  print("No")

Solution (Python):
btn=input().split()
A=int(btn[0])
B=int(btn[1])
C=int(btn[2])
if A < C < B:
	print("Yes")
elif A > C > B:
	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>b:
 print("Yes")
elif b>c>a:
 print("Yes")
else:
 print("No")

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

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 = list(map(int, input().split()))

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

Solution (Python):



from sys import stdin







n = stdin.readline().split()
a = int(n[0])
b = int(n[1])
c = int(n[2])


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

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

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

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

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

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

Solution (Python):
c=list(map(int, input().split()))
c_copy = sorted(c)
if c[2] == c_copy[1]:
    print('Yes')
else:
    print('No')

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

if abs(pos_list[0] - pos_list[1]) > abs(pos_list[0] - pos_list[2]) and \
    (pos_list[0] - pos_list[1]) * (pos_list[0] - pos_list[2]) > 0:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
A,B,C=map(int, input().split())
if (B>C and A<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:
    print('Yes')
elif a > c > b:
    print('Yes')
else:
    print('No')

Solution (Python):
a = list(map(int, input().split()))
if a[2]==max(a) or a[2] == min(a):
    print('No')
else:
    print('Yes')

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):
b=[int(i) for i in input().split()]
if (b[0]<b[2] and b[2]<b[1]) or (b[0]>b[2] and b[2]>b[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):
import sys

A, B, C = map(int, sys.stdin.readline().split())

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

Solution (Python):
ABC = [int(i) for i in input().split()]
answer = ""
if((ABC[2] > ABC[0] and ABC[2] < ABC[1]) or (ABC[2] < ABC[0] and ABC[2] > ABC[1])):
    answer = "Yes"
else:
    answer = "No"
print(answer)

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

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

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

tmp_max = max(A,B)
tmp_min = min(A,B)
A = tmp_min
B = tmp_max

if A <= C:
  if B >= C:
    print("Yes")
  else:
    print("No")
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())

def max(a,b):
    if a > b:
        return a
    else:
        return b

def min(a,b):
    if a < b :
        return a
    else:
        return b

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

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

Solution (Python):
s = [int(i) for i in input().split(" ")]
count = 0

if s[0] < s[1]:
    for i in range(s[0], s[1]):
        if i == s[2]:
            print("Yes")
            count = 1
            break

else:
    for i in range(s[1], s[0]):
        if i == s[2]:
            print("Yes")
            count = 1
            break

if count == 0:
    print("No")

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

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

Solution (Python):
import sys
def p(*a):
  s=" ".join(map(str,a))
  
  sys.stderr.write(s+"\n")


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

p(a,b,c)

ans="No"
if a<c and c<b: ans="Yes"
if b<c and c<a: ans="Yes"

print(ans)

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

Solution (Python):
a,b,c = map(int, input().split())
if (a-c) * (c-b) > 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):
a,b,c=map(int,input().split())
ans = ["No","Yes"]
print(ans[(min(a,b)<c<max(a,b))])

Solution (Python):


kazu = input().split()
for i in range(len(kazu)):
    kazu[i] = int(kazu[i])
if kazu[0] < kazu[1]:
    if kazu[0] < kazu[2] and kazu[1] > kazu[2]:
        print("Yes")
    else:
        print("No")
elif kazu[0] > kazu[1]:
    if kazu[0] > kazu[2] and kazu[1] < kazu[2]:
        print("Yes")
    else:
        print("No")

Solution (Python):
A, B, C = (int(x) for x in input().split())
if A < C < B or A > C > B:
    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 b < c < a:
  print("Yes")
else:
  print("No")

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

if A <= C <= B or A >= C >= B:
    print "Yes"
else:
    print "No"

Solution (Python):
n=list(map(int,input().split()))
m=sorted(n)
if n[2]==m[1]:
    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 <= b or b <= c <= a:
    print("Yes")
else:
    print("No")

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

Solution (Python):

import sys
import os

x,y,z = [int(i) for i in input().split(' ')]

if x > y:
    x,y = y,x

if x < z < y:
    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):



inp = input().split()

a = int(inp[0])
b = int(inp[1])
c = int(inp[2])

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 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 > b:
    items = range(b, a)
else:
    items = range(a, b)
if c in items:
    print("Yes")
else:
    print("No")

Solution (Python):
A, B, C = map(int, input().split())
AB_list = [int(i) for i in range(min(A, B), max(A, B))]

print("Yes" if C in AB_list else "No")

Solution (Python):
import sys
input=sys.stdin.readline
 
a,b,c=map(int,input().split())

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

Solution (Python):
A, B, C = list(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):
import sys

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


if A < B:
    if A < C < B:
        print('Yes')
        sys.exit()
    print('No')
    sys.exit()


if A > B:
    if B < C < A:
        print('Yes')
        sys.exit()
    print('No')
    sys.exit()

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:
    tmp = b
    b = a
    a = tmp

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

Solution (Python):


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

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

Solution (Python):
a , b , c = map(int , input().split())
n = min(a , b); m = max(a , b)
for i in range(n , m + 1):
  if i == c:
    print("Yes");exit(0)
print("No")

Solution (Python):
import sys


st = input().split()
i = [ int(x) for x in st]

del0 = abs(i[0]-i[1])
del1 = abs(i[1]-i[2])
del2 = abs(i[2]-i[0])

if del0 == del1+del2:
    print("Yes")
else:
    print("No")

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



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

Solution (Python):
a,b,c = map(int,input().split(" "))
if (a < c and c < b) or (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 B <= C and C <= A :
    print("Yes")
else:
    print("No")

Solution (Python):
s = input().split()
a = int(s[0])
b = int(s[1])
c = int(s[2])
 
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):
d=list(input().split())
a=int(d[0])
b=int(d[1])
c=int(d[2])
if a<=c<=b or b<=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 < b) and (a < c) and (c < b):
    print("Yes")
elif (a > b) and (a > c) and (c > b):
    print("Yes")
else:
    print("No")

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

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



if(C<=A and C>=B):
    print("Yes")
elif(C<=B 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=list(map(int,input().split()))
if (max(a)!=a[2])&(min(a)!=a[2]):print('Yes')
else:print('No')

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

    return a, b, c



if __name__ == '__main__':
    a, b, c = read_input()

    start = min(a, b)
    end = max(a, b)

    if start < c < end:
        print('Yes')
    else:
        print('No')

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

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

Solution (Python):
n=list(map(int,input().split()))
m=sorted(n)
if n[2]==m[1]:
    print("Yes")
else:
    print("No")

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

if A > B:
    A,B = B,A
if C in range(A,B+1):
    ans = "Yes"

print(ans)

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

Solution (Python):
ABC = input().split()
if (int(ABC[0]) < int(ABC[2]) < int(ABC[1])) or (int(ABC[1]) < int(ABC[2]) < int(ABC[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())

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

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

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

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

if A < C and C < B:
    print('Yes')
elif B < C and 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]):
    print("Yes")
elif(a[1] < a[2] and a[2] < 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')
else:
    if a < c and c < b:
        print('Yes')
    else:
        print('No')

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

Solution (Python):
a, b, c = list(map(int, input().split()))
for i in range(min(a, b), max(a, b)):
    if i == c:
        print('Yes')
        exit()
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 a < b:
    if (c < b) and (a < c):
        print("Yes")
    else:
        print("No")
else:
    if (c > b) and (a > c):
        print("Yes")
    else:
        print("No")

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

if A < B:
    if C in range(A, B):
        print("Yes")
    else:
        print("No")
else:
    if C in range(B, A):
        print("Yes")
    else:
        print("No")

Solution (Python):


import sys
import math


a,b,c = map(int, sys.stdin.readline().rstrip().split())
s = sorted([a,b,c]) 
if s[1] == c:
  print("Yes")
else:
  print("No")