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

Solution (Python):
import sys















input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())



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

l = raw_input().split()
a = int(l[0])
b = int(l[1])
c = int(l[2])

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

Solution (Python):

import sys



def solve(lines):
    A,B,C = map(int, lines.pop(0).split(' '))
    if min(A,B) < C and C < max(A,B):
        print('Yes')
    else:
        print('No')
lines = [x.strip() for x in sys.stdin.readlines()]




solve(lines)

Solution (Python):


from sys import stdin
    
def main():
    a,b,c = [int(x) for x in stdin.readline().rstrip().split()]
    if a < c and c < b:
        print('Yes')
    elif b < c and c < a:
        print('Yes')
    else:
        print('No')

if __name__=='__main__':
    main()

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

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

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

Solution (Python):


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

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

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

if A <= C and C <= B:
    ans = "Yes"
if B <= C and C <= A:
    ans = "Yes"
print(ans)

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

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

Solution (Python):
a, b, c = map(int, input().split())
l = [a, b, c]
l.sort()

print("Yes" if l[1] == c else "No" )

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

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

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

Solution (Python):
A,B,C = map(int, input().split())
count = 0
list1 = [A,B]

for i in range(min(list1),max(list1)):
    if C == i:
        count = 1
 
if count == 1:
    print("Yes")
else:
    print("No")

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

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

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

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

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

Solution (Python):
a,b,c=map(int, raw_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 c<a 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 =[int(i) for i in input().split()]

a1 = a[0]
a2 = a[1]
a3 = a[2]


if a1 < a3 < a2:
    print('Yes')
elif a2 < a3 < a1:
    print('Yes')
else:
    print('No')

Solution (Python):

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

Solution (Python):
from collections import defaultdict
from string import ascii_uppercase
import sys, bisect, math
stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

N = read_int()

def solve():
    if (N[0] < N[2] and N[1] > N[2]) or (N[0] > N[2] and N[1] < N[2]):
        return True
    return False

if __name__ == "__main__":
    if solve():
        print("Yes")
    else:
        print("No")

Solution (Python):

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

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

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

Solution (Python):
import sys

a, b, c = list(map(int, sys.stdin.readline().strip().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 min(a,b)<c and max(a,b)>c:
    print("Yes")
else:
    print("No")

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

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

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

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

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

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

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

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

if a > b:
    d = a
    a = b
    b = d

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

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

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

print(ans)

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

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

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

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

aa=min(a,b)
bb=max(a,b)

if(c>aa and c<bb):
  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 > a and c < b:
    tmp = 'Yes'
elif c < a and c > b:
    tmp = 'Yes'
else:
    tmp = 'No'
print(tmp)

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

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

Solution (Python):
if __name__ == '__main__':
    input_list = list(map(int, input().split()))

    A = int(input_list[0])
    B = int(input_list[1])
    C = int(input_list[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 A <= C and C <= B:
        print('Yes')
elif B < C and C < A:
        print('Yes')
else:
        print('No')

Solution (Python):


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

min_n = min(A, B)
max_n = max(A, B)

if min_n < C and max_n > C:
  print("Yes")
else:
  print("No")

Solution (Python):

import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read() for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


A, B, C = read_ints()
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,open(0).read().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 B >= C and C >= A:
        print("Yes")
    else:
        print("No")
else:
    if 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()]

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

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

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

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

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

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

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

for i in range(A+1,B):
	if i==C:
		print "Yes"
		quit()
else:
		print "No"

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

if (A[0] - A[2]) * (A[1] - A[2]) < 0:
  print('Yes')
else:
  print('No')

Solution (Python):



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

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

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

if a<=c and c<=b:
    print("Yes")
elif c<=a and b<=c:
    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 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 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):
A,B,C = [int(i) for i in input().split()]
if 0 <= A and B and C <=100:
    if A < C < B:
        print("Yes")
    elif B < C < A:
        print("Yes")
    else:
        print("No")

Solution (Python):

a, b, c = map(int, input().split())
flag = False
if a < c and c < b:
    flag = True
elif b < c and c < a:
    flag = True
if flag:
    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):
import sys
a,b,c=map(int,input().split())
n=1;k=b+1
if a>b:
        n=-1
        k=b-1
for i in range(a,k,n):
        if i==c:
                print("Yes")
                sys.exit()
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:
    small = A
    large = B

else:
    small = B
    large = A

if small < C < large:
    print('Yes')

else:
    print('No')

Solution (Python):
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline



def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [A, B, C] = [int(input_raw[0]), int(input_raw[1]), int(input_raw[2])]
    if A < B and A < C and C < B:
        print "Yes"
        return
    if B < A and A > C and B < C:
        print "Yes"
        return
    print "No"



if __name__ == '__main__':
    main()

Solution (Python):
A, B, C = map(int, input().split())
mn = min(A, B)
mx = max(A, B)
if mn < C and C < mx:
    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 = map(int,input().split())

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

print(ans)

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


main()

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

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

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

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

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

if (A < C) & (C < B):
    print('Yes')
    exit()

if (A > C) & (C > B):
    print('Yes')
    exit()



print('No')

Solution (Python):
a,b,c=list(map(int,input().split()))
r="No"
if a>b:
    for i in range(b,a):
        if i==c:
            r="Yes"
else:
    for i in range(a,b):
        if i==c:
            r="Yes"
print(r)

Solution (Python):
import sys
import math
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, input().split()))
ns = lambda: input()
A,B,C = na()

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

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

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

if a < c 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())
l = max(a,b)
m = min(a,b)
for i in range(m,l+1):
  if i==c:
    print("Yes")
    exit()
print("No")

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

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

print(['No', 'Yes'][(A<C and B>C) or (A>C and B<C)])

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

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

Solution (Python):
inp = [int(n) for n in input().split()]
if (inp[1] - inp[2]) * (inp[0] - inp[2]) < 0:
    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 < B and A <= C and C <= B:
    print('Yes')
elif 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:
    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 b <= c <= a:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
li = list(map(int,input().split()))
if li[0]<li[2]<li[1] or li[1]<li[2]<li[0]:
    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 >= b:
    if b <= c <= a:
        print("Yes")
    else:
        print("No")
elif a < b:
    if a <= 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 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 = (int(i) for i in input().split())
if A - B > 0:
    if (A > C) & (C > B):
        print('Yes')
    else:
        print('No')
else:
    if (A < C) & (C < B):
        print('Yes')
    else:
        print('No')

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


print(["No", "Yes"][min(A, B) <= C <= max(A, B)])

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

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

Solution (Python):
a,b,c = 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 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]
output = "No"

if A<C and C<B:
    output = "Yes"
if B<C and C<A:
    output = "Yes"

print(output)

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

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

Solution (Python):
from sys import stdin

import numpy as np





A, B, C = [int(x) for x in stdin.readline().rstrip().split()]

AC = A-C
BC = B-C

abc = AC*BC
if abc>=0:
  print("No")
else:
  print("Yes")

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

Solution (Python):

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

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

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

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

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

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

else:
    if B < C:
        print('Yes')
        exit()

print('No')

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

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

if a < c < b:
    print('Yes')
    exit(0)

if b < c < a:
    print('Yes')
    exit(0)

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

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

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

Solution (Python):


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

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

Solution (Python):
"""
python3 a.py < input.txt
"""
import math
import itertools as it
import heapq

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

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

Solution (Python):
from sys import stdin
a, b, c = [int(x) for x in stdin.readline().rstrip().split()]
ans = "No"

if ( a<c and c<b):
  ans = "Yes"
if ( b<c and c<a):
  ans = "Yes"

print(ans)

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

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

Solution (Python):
from sys import stdin
import math
import itertools


def makeIntMatrix(lines):
    intMatrix = []
    for a in makeStringMatrix(lines):
        intMatrix.append([int(b) for b in a])
    return intMatrix
 
 
def makeStringMatrix(lines):
    stringMatrix = [line.split() for line in lines]
    return stringMatrix
 
 
def makeInt(line):
    return int(line.rstrip())
 
 
def makeMultiInteger(line):
    return [int(x) for x in line.rstrip().split()]


def solve(input_string):
    a, b, c = makeMultiInteger(input_string[0])
    
    if a >= c and b <= c:
        return "Yes"
    if b >= c and a <= c:
        return "Yes"
    return "No"


def main():
    input_lines = stdin.readlines()
    answer = solve(input_lines)
    print(answer)


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

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

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

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

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

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

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

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

Solution (Python):
A,B,C=map(int,input().split())
M=max(A,B)
m=min(A,B)
if m<C and C<M:
  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')