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

Solution (Python):

def main():

    A,B,C =map(int,input().split())
    
    if (A-C)*(B-C)>0:
        print("No")
    else:
        print("Yes")




if __name__ == "__main__":
    main()

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

if (A-C)*(B-C)>0:
    print("No")
else:
    print("Yes")

Solution (Python):
import sys



def input():
    return sys.stdin.readline().rstrip()

def main():
    
    A,B,C =map(int,input().split())
    
    if (A-C)*(B-C)>0:
        print("No")
    else:
        print("Yes")
    



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

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

Solution (Python):
import math
from datetime import date

def main():
	line = input().split()
	a = int(line[0])
	b = int(line[1])
	c = int(line[2])

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

main()

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

Solution (Python):
L = [int(T) for T in input().split()]
print(['No','Yes'][sorted(L)[1]==L[2]])

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

count = 0
if A > B:
    for i in range (B, A):
        if i == C:
            count = 1
elif A < B:
    for i in range (A, B):
        if i == C:
            count = 1

if count == 1:
    print("Yes")
else:
    print("No")

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

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







e1,e2,e3 = map(int,input().split())






if e1<=e3<=e2 or e2<=e3<=e1:
    print("Yes")
else:
    print("No")

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

Solution (Python):
a,b,c=list(map(int ,input().split()))
ans_range=range(a,b)
ans_range1=range(b,a)
if(c in ans_range or c in ans_range1):
	print("Yes")
else:
	print("No")

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

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

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

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


if __name__ == '__main__':
    main()

Solution (Python):

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

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

if __name__ == '__main__':
    main()

Solution (Python):

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

Solution (Python):
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())


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

Solution (Python):
A,B,C=map(int,input().split())
if A<B:
    while True:
        if A==C:
            print("Yes")
            break
        if A==B:
            print("No")
            break
        A+=1
if B<A:
    while True:
        if A==C:
            print("Yes")
            break
        if A==B:
            print("No")
            break
        A-=1

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate, product 

from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect














import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7


from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
  return int(readline())
a,b,c = readInts()
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 LI():
    return list(map(int, input().split()))


A, B, C = LI()
if A < C < B or B < C < A:
    ans = "Yes"
else:
    ans = "No"
print(ans)

Solution (Python):
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right
from math import gcd,ceil,floor,factorial

from functools import reduce
from pprint import pprint
from statistics import mean,median,mode

INF = float("inf")

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

def I():
    return int(input())

def MI():
    return map(int,input().split())

def RI():
    return list(map(int,input().split()))

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def S():
    return input()

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

def RS():
    return list(input())

def CS(n):
    return [ input() for _ in range(n) ]

def LS(n):
    return [ list(input()) for _ in range(n) ]







a,b,c = MI()

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  
def LS2(): return list(sys.stdin.readline().rstrip())  


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

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

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

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

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

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

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate, product 

from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect














import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7


from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
  return int(readline())
a,b,c = readInts()
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 = list(map(int, input().split()))
c = a[2]
print("Yes" if sorted(a)[1]==c 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):
def main():
    a, b, c = map(int, input().split())

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

Solution (Python):
A,B,C = list(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())
print("Yes" if (a<b and a<c<b) or (a>b and b<c<a) else "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 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("YNeos"[(B-C)*(C-A)<0::2])

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

Solution (Python):
'''
Created on 2020/08/20

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  A,B,C=map(int,pin().split())
  if (A<C and C<B) or (B<C and C<A):
    print("Yes")
    return 
  print("No")
  return 

main()

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
a, b, c = M()
l = [a, b, c]
l.sort()
if l[1] == c:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

if x[1] == c:
    ans = "Yes"
    
print(ans)

Solution (Python):
a, b, c = map(int, input().split())
print('Yes') if (a < c < b) | (b < c <a) 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):
import sys, math
from functools import lru_cache
from collections import deque
sys.setrecursionlimit(500000)
MOD = 10**9+7

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

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    A, B, C = mi()
    if A < C < B or A > C > B:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

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

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

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

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

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

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 = map(int,input().split())
li = [a,b,c]
li.sort()
if li[1] == c:
    print("Yes")
else:
    print("No")

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

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

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

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

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

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

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

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

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    L=LI()
    if L[2]==(sum(L) - min(L) - max(L)):
        print("Yes")
    else:
        print("No")

main()

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

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

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

if a>c>b or a<c<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<=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<=b or a>=c>=b else "No")

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

Solution (Python):

from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right

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):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    A, B, C = LI()

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

if __name__ == '__main__':
    resolve()

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())
V = sorted([A, B, C])
ans = 'Yes' if V[1] == C else 'No'
print(ans)

Solution (Python):


import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union































def main():
    Num = Union[int, float]
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def isp():   return input().split()
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    
    a, b, c = mi()
    print('Yes') if a < c < b or a > c > b else print('No')


if __name__ == "__main__":
    main()

Solution (Python):
a,b,c=map(int,input().split());print("NYoe s"[(a<c<b or b<c<a)::2])

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

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

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



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

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7


A, B, C = MAP()

if C == sorted([A, B, C])[1]:
	print("Yes")
else:
	print("No")

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())
print(['No','Yes'][a<c<b or b<c<a])

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