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):
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from math import ceil, floor
from sys import setrecursionlimit

import heapq
import itertools
import operator



inf = float('inf')
N = 0


def set_inputs():
    global N
    return


def main():
    setrecursionlimit(100000)
    set_inputs()
    
    a, b, c = get_li()
    if a < c < b or a > c > b:
        print("Yes")
    else:
        print("No")
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def get_data(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    main()

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())
AB = B - A
AC = C - A

if (A<B and A<C) or (A>B and A>C):
  AB_a = abs(AB)
  AC_a = abs(AC)
  if AB_a < AC_a:
    print('No')
  else:
    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 = tuple([int(x) for x in input().split(' ')])

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

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


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

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

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):
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 or c < a 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):
abc = list(map(int, input().split()))
a = abc[0]
b = abc[1]
c = abc[2]

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

Solution (Python):
inp = [int(f) for f in input().split()]
if inp[0] > inp[2]:
    if inp[1] < inp[2]:
        print('Yes')
    else:
        print('No')
elif inp[0] < inp[2]:
    if inp[1] > inp[2]:
        print('Yes')
    else:
        print('No')

Solution (Python):
l = list(map(int,input().split()))
s1 = set(list(range(max(l[0],l[1])+1)))
s2 = set(list(range(min(l[1],l[0])+1)))

s3 = s1 - s2
if l[2] in s3: 
    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())
if A<C and B<C:
  print('No')
elif A>C and B>C:
  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):
A, B, C = map(int, input().split())
if A <= C <= B or B <= C <= A:
    print('Yes')
else:
    print('No')

Solution (Python):
def Ways(a,b,c):
    if c>=min(a,b) and c<=max(a,b):
        return 'Yes'
    else:
        return 'No'

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

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

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

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

if int(A) < int(C) and int(C) < int(B):
  print("Yes")
elif int(B) < int(C) and int(C) < int(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 (min(a, b) < c < max(a,b)):
    print("Yes")
else:
    print("No")

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

print('Yes' if any((A <= C <= B, B <= C <= A)) else 'No')

Solution (Python):
argA,argB,argC = list(map(int,input().split()))

if argA > argB:
  if argA > argC and argC > argB:
    print("Yes")
  else:
    print("No")
else:
  if argB > argC and argC > argA:
    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,b,c=[int(i) for i in input().split()]
print("Yes" if min(a,b)<=c<=max(a,b) else "No")

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

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

Solution (Python):
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=map(int,input().split())
if A>B:
    E=B
    B=A
    A=E

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

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

Solution (Python):
A,B,C = list(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 = [ int(i) for i in input().split() ]
print( "Yes" if max(A,B) > C and min(A,B) < C 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 = [int(x) for x in input().split()]

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

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    a, b, c = [int(i) for i in input().split()]
    min_ = min([a, b])
    max_ = max([a, b])
    print("Yes" if min_ <= c <= max_ else "No")


if __name__ == "__main__":
    main()

Solution (Python):
A, B, C = [int(s) for s in 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:
    print("Yes")
elif b<c<a:
    print("Yes")
else:
    print("No")

Solution (Python):

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

Solution (Python):
A, B, C = map(int, input().split())
 
min_h = min(A,B)
max_h = max(A,B)
if min_h<=C and C<=max_h:
    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 = [int(x) for x in input().split()] 

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

if min(a_c[0], a_c[1]) < a_c[2] < max(a_c[0], a_c[1]):
    print("Yes")

else:
    print("No")

Solution (Python):


import sys

input = sys.stdin.readline
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,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())
print("Yes" if (a <= c <= b)|(b <= c <= a) else "No")

Solution (Python):
li = list(map(int, input().split()))
A = li[0]
B = li[1]
C = li[2]
 
if A < C < B or A > C > 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):
def main():
    A, B, C = map(int, input().split())

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


if __name__ == '__main__':
    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):
start, goal, point = list(map(int, input().split()))

if (start - point) * (goal - point) <= 0:
    print('Yes')
else:
    print('No')

Solution (Python):
n=input().split()
for i in range(3):
    n[i]=int(n[i])
if n[0]<n[2]<n[1] or n[1]<n[2]<n[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 < b:
    if a < c and b > c:
        print('Yes')
    else:
        print('No')
else:
    if b < c and a > 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 = 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 or 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):
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())
for i in range(min(A, B), max(A, B)+1):
    if i == C:
        print("Yes")
        exit()
print("No")

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

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):
s = input().split()
s = [int(i) for i in s]
if ((s[0] < s[2]) and (s[2] < s[1])) or ((s[0] > s[2]) and (s[2] > s[1])):
    print("Yes")
else:
    print("No")

Solution (Python):
from sys import stdin
a, b, c = [int(x) for x in stdin.readline().rstrip().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())
if a<c and c<b:
    print("Yes")
elif a>c and c>b:
    print("Yes")
else:
    print("No")

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

if __name__ == "__main__":
    main()

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

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

Solution (Python):
xs = list(map(int,input().split(' ')))
if xs[0] < xs[1]:
  if xs[0] < xs[2] and xs[2] < xs[1]:
    print('Yes')
  else:
    print('No')
else:
  if xs[0] > xs[2] and xs[2] > xs[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())

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

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

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

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

Solution (Python):
from sys import stdin
a,b,c = [int(_) for _ in stdin.readline().rstrip().split()]
if a <= b:
    print('Yes' if c in [i for i in range(a,b+1)] else 'No')
else:
    print('Yes' if c in [i for i in range(b,a+1)[::-1]] else 'No')

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):
def main(num_1, num_2, num_3):
    if (num_3 > num_1 and num_3 > num_2) or (num_3 < num_1 and num_3 < num_2):
        return 'No'
    else:
        return 'Yes'


if __name__ == "__main__":
    num_1, num_2, num_3 = list(map(int, input().split()))
    print(main(num_1, num_2, num_3))

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 = ( int(i) for i in input().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) 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):
from sys import stdin
A, B, C = [int(x) for x in stdin.readline().rstrip().split()]
if (A < B and A < C and C < B) or (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())
if A<C and C<B:
    print('Yes')
elif B<C and C<A:
    print('Yes')
else:
    print('No')

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

result = 'Yes'
t = min(a,b)
u = max(a,b)
if c > t and c < u:
    print(result)
else :
    result = 'No'
    print(result)

Solution (Python):
def main():
    a, b, c = map(int, input().split())
    if min(a, b, c) == a and max(a, b, c) == b:
        return 'Yes'
    if min(a, b, c) == b and max(a, b, c) == a:
        return 'Yes'
    return 'No'
print(main())

Solution (Python):
a = [int(x) for x in 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())
ans='No'
if A<B:
    if A<C<B:
        ans='Yes'
else:
    if B<C<A:
        ans='Yes'
print(ans)

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

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

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

Solution (Python):
a,b,c = list(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):
s = input().split(" ")
s = [int(s[i]) for i in range(3)]
A = s[0]
B = s[1]
C = s[2]
minPoint = min(A , B)
maxPoint = max(A, B)
if minPoint < C and C < maxPoint : 
    print("Yes")
else : 
    print("No")

Solution (Python):
A = input().split()
B = int(A[1])
C = int(A[2])
A = int(A[0])
if A<C & C<B or A>C & C>B:
    print("Yes")
else:
    print("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 = list(map(int,input().split()))

if c in range(min(a,b),max(a,b)):
	print("Yes")
else:
	print("No")

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

Solution (Python):
h1, h2, d = list(map(int, (input().split())))

if(h1 > h2):
    temp = h2
    h2 = h1
    h1 = temp

if(d >= h1 and d <= h2):
    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):


import re

n = input()
n = re.split(" ",n)

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

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

Solution (Python):
a1,b1,c1 = input().split()
a = int(a1)
b = int(b1)
c = int(c1)
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):
S = list(map(int, input().split(' ')))
if (S[0] < S[2] and S[2] < S[1]) or (S[1] < S[2] and S[2] < S[0]):
    print("Yes")
else:
    print("No")

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

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

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

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

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

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

a = input[0]
b = input[1]
c = input[2]

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

Solution (Python):
def main():
    ABC = list(map(int, input().split()))
    A, B, C = ABC[0], ABC[1], ABC[2]
    if A < C:
        if C < B:
            print('Yes')
        else:
            print('No')
    if A > C:
        if C > B:
            print('Yes')
        else:
            print('No')
main()

Solution (Python):
list1 = list(map(int,input().split()))
if(list1[2]<=list1[1] and list1[2]>=list1[0]):
    print("Yes")
elif(list1[2]>=list1[1] and list1[2]<=list1[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())
MapList = [A,B,C]
MapList.sort()
if MapList[1] == 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):
a,b,c=input().split()
 
a=int(a)
b=int(b)
c=int(c)
if (a <b) and (a < c and c < b)or(b <a )and(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 = list(map(int, input().strip().split()))

if (A>B) :
    tmp = A
    A = B
    B = tmp

if (A < C and B > C) :
    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())

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

else:
    print('No')

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

t = False
if (N[0] < N[1]) == (N[0] < N[2]):
    if abs(N[1] - N[0]) > abs(N[2] - N[0]):
        t = True

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

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

y = 'No'

if a < b:
    if (c > a) & (c < b):
        y = 'Yes'

if a > b:
    if (c > b) & (c < a):
        y = 'Yes'

print(y)

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

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

for i in range(a, b+1):
  if i == c:
    print('Yes')
    break
  if i == b:
    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 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 <= b or a >= c >= b:
    print("Yes")
else:
    print("No")

Solution (Python):

import re
import bisect
from datetime import datetime as dt
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())
print(('No', 'Yes')[a < c < b or a > c > b])

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

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

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

    else:
        print('No')


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 (b<=c and a>=c) or (b>=c and a<=c):
    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):
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def ii(): return int(stdin.readline())
def li(): return map(int, stdin.readline().split())
A, B, C = tuple(li())
A, B = sorted([A, B])
if C in range(A, B):
    print("Yes")
else:
    print("No")

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

print(solve())

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<c<b or b<c<a:
    print('Yes')
else:
    print('No')

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

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

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())

b = min(a,b) <= c and c <= max(a,b)

print( 'Yes' if b else 'No')

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

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

Solution (Python):



import numpy as np
import scipy as sp

def main():
    while True:
        try:
            li = list(map(int,input().split()))
            sorted_li = sorted(li)
            if sorted_li == [li[0], li[2], li[1]] or sorted_li == [li[1], li[2], li[0]]:
                print("Yes")
            else:
                print("No")
        except:
            break

if __name__ == '__main__':
    main()

Solution (Python):

"""
AtCoder A
"""

def main():
    A,B,C=list(map(int,input().split()))
    if A<C and C<B:
        print("Yes")
    elif A>C and C>B:
        print("Yes")
    else:
        print("No")
    
if __name__ == "__main__":
    main()

Solution (Python):
a = input().split()
i=int(a[0])
j=int(a[1])
k=int(a[2])
if i < k and j < k:
   print('No')
elif i>k and j>k:
   print('No')
else:
   print('Yes')

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>b or a<c<b:
    print('Yes')
else:
    print('No')

Solution (Python):
import re
import sys
from itertools import product

import numpy as np

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    A, B, C = il()
    return "Yes" if A < C < B or B < C < A else "No"


if __name__ == "__main__":
    print(solve())

Solution (Python):
a = input().split()
i=int(a[0])
j=int(a[1])
k=int(a[2])
if i < k and j < k:
   print('No')
elif i>k and j>k:
   print('No')
else:
   print('Yes')

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 b < c and c < a:
        print('Yes')
    else:
        print('No')