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(x) for x in input().split()]

out='No'

if A < B:
  if A < C & C < B:
    out='Yes'

else:
  if B < C & C < A:
    out='Yes'
    
print(out)

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

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

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

Solution (Python):

import copy
import numpy as np
import random
import bisect 
import math

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

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

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

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

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

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

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


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):

def main():
    a, b, c = map(int, input().split())
    if a < c < b or b < c < a:
        return "Yes"
    return "No"


print(main())

Solution (Python):


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

Solution (Python):
a,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())

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

Solution (Python):
s=map(lambda x:int(x),raw_input().split())
if sorted(s)[1]==s[2]:
  print("Yes")
else:
  print("No")

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

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

Solution (Python):

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

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

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

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

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

Solution (Python):
A, B, C = list(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 (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 a<c<b:
    print('Yes')
else:
    print('No')

Solution (Python):
from collections import deque


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

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

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

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

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

a_int = [int(x) for x in a]

if (a_int[2] > a_int[0] and a_int[1] > a_int[2]):
    print("Yes")

elif(a_int[2] < a_int[0] and a_int[1] < a_int[2]):
    print("Yes")

else :
    print("No")

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

Solution (Python):

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

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


print("{}".format(ans))

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

x = max(A,B)
y = min(A,B)



if y <= C and C <= x:
    print("Yes")
else:
    print("No")

Solution (Python):
home_list = list(map(int, input().split()))
print("Yes" if home_list.index(max(home_list)) != 2 and home_list.index(min(home_list)) != 2 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 max([a, b, c]) != c and min([a, b, c]) != 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):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    a, b, c = LI()
    if b < a:
        a,b = b,a
    if a <= c <= b:
        print("Yes")
    else:
        print("No")
    return


def B():
    n = II()
    s = input()
    a = list(set(list(s)))
    k = II()
    for i in a:
        if s[k] != i:
            s = s.replace(i, "*")
    print(s)
    return


def C():
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    A()

Solution (Python):
n=input().split(" ")

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
A,B,C = map(int,input().split())
if(A<C 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):
l = [int(x) for x in input().split()]
c = l[-1]
l_max = max(l)
l_min = min(l)

if c not in [l_max, l_min]:
    print("Yes")
else:
    print("No")

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

a_ = min(a,b)
b_ = max(a,b)

if a_ >= c :
	print("No")
elif b_ <= c:
	print("No")
else:
	print("Yes")

Solution (Python):

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

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

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

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

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

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

Solution (Python):

input = input().split()

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

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

Solution (Python):
abc=list(map(int,input().split()))
a=abc[0]
b=abc[1]
c=abc[2]
if (b-c)*(a-c)<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=[int(x) for x in input().split()]
if min(a,b)<=c<=max(a,b):
    print("Yes")
else:
    print("No")

Solution (Python):


import sys
input = sys.stdin.readline

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

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

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]


    token = lines[0].split()
    a = int(token[0])
    b = int(token[1])
    c = int(token[2])

    return (a, b, c)


def solve(a, b, c):

    result = "No"
    if a <= c and c <= b:
        result = "Yes"
    if a >= c and c >= b:
        result = "Yes"

    return result


def main():
    

    print("%s" % solve(*parse_input()))

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

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

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

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

Solution (Python):
a=input()
b=a.split()
x=int(b[0])
y=int(b[1])
z=int(b[2])
if x>=z>=y or x<=z<=y:
    print("Yes")
else:
    print("No")

Solution (Python):


def solve():
    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__":
    solve()

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):
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())
lst = list(range(min(a,b), max(a,b)+1))
if c in lst:
    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 = 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 > B:
    if B < C and A > 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 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())
print('Yes' if c in range(min(a, b), max(a, b)) else 'No')

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

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

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

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

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

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

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

cond1 = A < C < B
cond2 = B < C < A

if cond1 or cond2:
    out = "Yes"
else:
    out = "No"
print(out)

Solution (Python):
from sys import stdin
input=stdin.readline().rstrip().split()

for i in range(3):
    input[i]=int(input[i])

output="No"
if (input[0]-input[2])*(input[1]-input[2])<0:
    output="Yes"

print(output)

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

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

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

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

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

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

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

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

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

Solution (Python):
A=list(map(int,input().split()))
if A[2]!=max(A) and A[2]!=min(A):
    print("Yes")
else: 
    print("No")

Solution (Python):
import sys
A,B,C = map(int,input().split())
if A>B:
    for i in range(A,B,-1):
        if i == C:
            print("Yes")
            sys.exit()
else:
    for i in range(A,B,1):
        if i == C:
            print("Yes")
            sys.exit()
print("No")

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

result = False
if a <= c <= b:
    result = True
elif b <= c <= a:
    result = True

if result:
    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 = input().split()
a = int(a)
b = int(b)
c = int(c)

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

Solution (Python):
def main():
    A,B,C = list(map(int,input().split(" ")))
    if A < C and C < B:
        return "Yes"

    elif A>C and B<C:
        return "Yes"
    else:
        return "No"

print(main())

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

Solution (Python):
import sys
A,B,C = map(int,input().split())
if A>B:
    for i in range(A,B,-1):
        if i == C:
            print("Yes")
            sys.exit()
else:
    for i in range(A,B,1):
        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 = input()
a = list(map(int, a.split(' ')))

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

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

Solution (Python):




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

if __name__ == '__main__':
	import sys
	sys.exit(main())

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

Solution (Python):
from sys import stdin
s_data = stdin.readline().rstrip().split()
data = [int(itr) for itr in s_data]
A = data[0]
B = data[1]
C = data[2]
if (B <= C and C <= A) or (A <= C and C <= B):
    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:
    goal=a
    start=b
else:
    goal=b
    start=a
    
ans="No"
if c>start and c<goal:
    ans="Yes"
print(ans)

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

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

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

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

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

if a <= c <= b 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):
A, B, C = map(int,input().split(" "))

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

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

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

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

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

Solution (Python):


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

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

Solution (Python):


'''
n=int(input())
s=input()
k=int(input())
'''
a,b,c=map(int,input().split())
'''
a=[int(i) in range(n)]
a=[0]*n
for i in range(n):
    a.append(int(i))
'''
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())
if A < C and C < B:
    ans = "Yes"
elif B < C and C < A:
    ans = "Yes"
else:
    ans = "No"
print(ans)

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):
zahyo = [int(x) for x in input().split()]
zahyo_sorted = sorted(zahyo)

if zahyo_sorted.index(zahyo[2]) == 1:
    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 b <= c) or (b >= c and a <= c)):
    co = "Yes"
else :
    co = "No"


print(co)

Solution (Python):
a = [int(item) for item in input().split()]

val = a[0:2]
val.sort()
if a[2] < val[1] and a[2] > val[0]:
    print("Yes")
else:
    print("No")

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

if (in1[2] > in1[0] and in1[2] < in1[1]) or (in1[2] < in1[0] and in1[2] > in1[1]):
    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")
if a>b:
    if 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):
zahyou = list(map(int, input().split()))

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

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

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

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

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

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