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 = [ int(i) for i in input().split() ]

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

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

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

if a>c and b <c:
    answer = 'Yes'

print(answer)

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

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

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

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

start = min((A, B))
end = max((A, B))

if start <= C and C<= end:
    print('Yes')
else:
    print('No')

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

if a > b:
    if b < c <a:
        print('Yes')
    else:
        print('No')
else:
    if 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())
n=max(a,b)
m=min(a,b)

if m<=c and n>=c:
    print('Yes')
else:
    print('No')

Solution (Python):
def main():
    A, B, C = list(map(int, input().split()))
    print('YNeos'[not(min(A, B) < C < max(A, B))::2])


main()

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

main()

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

if(a > b):
	temp = a
	a = b
	b = temp

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

Solution (Python):
from sys import stdin

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

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

input = lambda: stdin.readline()
main()

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

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

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

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

D = max([A, B])
E = min([A, B])
if E <= C <= D:
  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):
def solve():
  a,b,c= (int(i) for i in input().split())
  if a<= c and b >= c:
    print('Yes')
  elif a >= c and b <= c:
    print('Yes')
  else:
    print('No')

solve()

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

if a > b:
    if b <= c <= a:
        print("Yes")
        exit()
else:
    if a <= c <= b:
        print("Yes")
        exit()

print("No")

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

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

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

x = min([a,b])
y = max([a,b])

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

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

Solution (Python):



ABC = input().split(' ')
A = int(ABC[0])
B = int(ABC[1])
C = int(ABC[2])

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

Solution (Python):
arr=input().split(' ')
a=int(arr[0])
b=int(arr[1])
c=int(arr[2])
if ( a < c and c < b ) or ( b < c and c < a ):
	print("Yes")
else:
	print("No")

Solution (Python):
from sys import exit
A,B,C = [int(n) for n in input().split()]






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

Solution (Python):


















import math
import copy
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations
from bisect import bisect_left, bisect_right



dy = [0, 0, 1, -1]
dx = [1, -1, 0, 0]
INF = float("inf")

def i_inpl(): return int(input())
def s_inpl(): return map(int,input().split())
def l_inpl(): return list(map(int, input().split()))

a, b, c = s_inpl()

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

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

right = max(A, B)
left = min(A, B)

if left < C and C < right:
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):



A, B, C = map(int, input().rstrip().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):
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 A >= C and B <= C:
        print("Yes")
    elif A <= C and B >= C:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Solution (Python):
import sys
import numpy as np

readInt = lambda: int(sys.stdin.readline())
readIntN = lambda: [int(v) for v in sys.stdin.readline().split(' ')]

a, b, c = readIntN()
minv = min(a, b)
maxv = max(a, b)
ret = 'Yes' if minv < c < maxv else 'No'
print(ret)

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 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 and max(a, b) > c:
    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())

print('Yes') if (A <= C <= B or B<= C<= A) 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())

flag = False
if a<=c and c<=b:
    flag = True

if b<=c and c<=a:
    flag = True


if flag:
    print('Yes')
else:
    print('No')

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

Solution (Python):


import math






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

if lis[0]<lis[2] and lis[1]>lis[2]:
    ans="Yes"
elif lis[0]>lis[2] and lis[1]<lis[2]:
    ans="Yes"
else:
    ans="No"

print(ans)

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

Solution (Python):
A, B, C = map(int, input().split())
if A < B:
	print('Yes' if A < C and C < B else 'No')
else :
	print('Yes' if A > C and C > B else '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 = 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:
    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):
def MI(): return map(int, input().split())
def II(): return int(input())
def IS(): return input()
def LI(): return list(map(int, input().split()))

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

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

Solution (Python):
def ns():
    import sys
    return map(int, sys.stdin.readline().split())
  
a, b, c = ns()
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 and c<b) or (a>c and c>b) else "No")

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

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

if a < c < b:
    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):
[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().split(' '))

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



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

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

if __name__ == '__main__':
    main()

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

Solution (Python):
if __name__ == '__main__':

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

if C < max(A,B) and C > min(A,B):
    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 > b:a,b = b,a
if 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):
temp = input().split(" ")
a = temp[0]
b = temp[1]
c = temp[2]

a = int(a)
b = int(b)
c = int(c)

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 - c) <= 0:
    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):


def readInts():
  return [int(s) for s in input().split(" ")]

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

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

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

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

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
input = sys.stdin.readline




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

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

	
	
if __name__ == "__main__":
	main()

Solution (Python):
def gcd_core(a, b):
    if b == 0:
        return a
    else:
        return gcd_core(b, a % b)


def gcd(arr):
    g = gcd_core(arr[0], arr[1])
    for i in range(2, len(arr)):
        g = gcd_core(g, arr[i])
    return g

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

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

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

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

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





import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline() for _ in range(n)]
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main(A, B, C):
    if A <= C and C <= B:
        print('Yes')
    elif B <= C and C <= A:
        print('Yes')
    else:
        print('No')

A, B, C = i2nn()
main(A, B, C)

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:
    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 (c > a and c < b) 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:
  print("Yes")
elif c<a and b<c:
  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 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):
from sys import exit

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 min(A,B) < C < max(A,B):
    print("Yes")
else:
    print("No")

Solution (Python):
a, b, c = map(int, input().split())
big = max(a, b)
small = min(a, b)
print('Yes' if small <= c <= big 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=map(int, input().split())
print("Yes" if (A<C and C<B) or (A>C and C>B) else "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 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):
from sys import stdin
A,B,C=[int(x) for x in stdin.readline().rstrip().split()]
data=[A,B,C]
data=sorted(data)
if data[1] == C:
    print("Yes")
else:
    print("No")

Solution (Python):
import math



x,y,z=map(int,input().split())
if min([x,y])<=z and z<=max([x,y]):
    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 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):
    print("Yes")
elif(b<c<a):
    print("Yes")
else:
    print("No")

Solution (Python):


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


if __name__ == '__main__':
    main()

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

Solution (Python):
from sys import exit

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
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float('inf')
MOD = 10**9+7
dy = [0,1,0,-1]
dx = [1,0,-1,0]
ddy = [0,1,1,1,0,-1,-1,-1]
ddx = [1,1,0,-1,-1,-1,0,1]

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

Solution (Python):
from heapq import heappush,heappop

def int_raw():
    return int(input())

def ss_raw():
    return input().split()

def ints_raw():
    return list(map(int, ss_raw()))


def runLength(in_str):
    kukan = 1
    start = 0
    ret = []
    for i in range(1,len(in_str)):
        if in_str[i-1]!=in_str[i]:
            ret.append([in_str[i-1],kukan,start])
            start = i
            kukan=0
        kukan+=1
    ret.append([in_str[-1],kukan,start])
    return ret

A,B,C = ints_raw()

def main():

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

print(main())

Solution (Python):


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

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

Solution (Python):
ABC = [int(i) for i in input().split()]

if ABC[0] > ABC[2] > ABC[1] or ABC[1] > ABC[2] > ABC[0]:
    print('Yes')
else:
    print('No')

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

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

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

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

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

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

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    INF = float("inf")
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    a, b, c = (int(_) for _ in input().split())
    if (c > a and c < b) or (c > b and c < a):
        print('Yes')
    else:
        print('No')
    
if __name__ == '__main__':
    main()

Solution (Python):

def kari():
    N = list(map(int, input().split()))
    A, B = map(int, input().split())

def main():
    N = list(map(int, input().split()))
    if N[0] <= N[2] <= N[1] or N[0] >= N[2] >= N[1]:
        print('Yes')
    else:
        print('No')



if __name__ == '__main__':
    main()

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())
L = [a,b]
L.sort()
if L[0] <= c <= L[1]:
  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 b < c 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 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):
p=input().split()
p,q,c=int(p[0]), int(p[1]), int(p[2])
a, b=min([p,q]), max([p,q])
if 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 or A >= C >= 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):
n, m, c = input().split()
N = int(n)
M = int(m)
C = int(c)

if C < M and N < C:
    print("Yes")
    exit()
if C < N and M < C:
    print("Yes")
    exit()
print("No")

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