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



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

Solution (Python):
def inpl():
    return list(map(int, input().split()))


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

Solution (Python):
A,B,C = input().split()
A,B,C = int(A),int(B),int(C)
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(("No","Yes")[(a-c)*(c-b)>0])

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

Solution (Python):

a, b, c = [int(s) for s in input().split()]
print('Yes' if a <= c <= b or b <= c <= a else 'No')

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

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

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

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

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

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

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

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    a, b, c = list(map(int, input().rstrip('\n').split()))
    abc1 = sorted([a, b, c])
    if abc1[1] == c:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    slove()

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, open(0).read().split())
print("Yes" if A<C<B or A>C>B else "No")

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

Solution (Python):
A, B, C = tuple(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):
def slove():
    import sys
    input = sys.stdin.readline
    a, b, c = list(map(int, input().rstrip('\n').split()))
    if a < c < b or a > c > b:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    slove()

Solution (Python):
a, b, c = map(int, input().split())
A = min(a, b)
B = max(a, b)


if c in range(A, B + 1):
    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())
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 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 B <= C and C <= A:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(A: int, B: int, C: int):
    if(A <= C <= B or A >= C >= B):
        print(YES)
    else:
        print(NO)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    C = int(next(tokens))  
    solve(A, B, C)

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

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


if __name__ == "__main__":
    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 < c and c < b:
    print("Yes")

elif b < c and c < a:
    print("Yes")

else:
    print("No")

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
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 and c<b) or (b<c and c<a)):
    print("Yes")
else:
    print("No")

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

Solution (Python):
a,b,c=map(int,input().split());print('YNeos'[(c-a)*(c-b)>0::2])

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

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

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

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

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

if m[0]<m[2]<m[1]:
    print('Yes')
elif m[1]<m[2]<m[0]:
    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:
    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 <= 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 B < C < A:
        return "Yes"
    return "No"

if __name__ == '__main__':
    print(main())

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

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10000000)
def input():
    return sys.stdin.readline()[:-1]
from bisect import *
from collections import *
from heapq import *
from fractions import Fraction

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007


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


def B():

    return


def C():

    return


def D():

    return


def E():

    return


def F():

    return


def G():

    return


if __name__ == "__main__":
    A()

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

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

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

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

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

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

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

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

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

Solution (Python):
def solve(a,b,c):
    return "Yes" if (a < c < b) or (b < c < a) else "No"

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

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    a,b,c = LI()

    if sorted([a,b,c])[1] == c:
        return 'Yes'

    return 'No'


print(main())

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

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

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

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

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

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

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

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

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

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b



def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2



def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)



def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

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

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

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

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):
from sys import stdin


def answer(x, y, C):
    if x < C < y:
        print("Yes")
    else:
        print("No")


def main():
    A, B, C = [int(x) for x in stdin.readline().split()]
    if A < B:
        answer(A, B, C)
    else:
        answer(B, A, C)


if __name__ == "__main__":
    main()

Solution (Python):
from sys import stdin

'''
def answer(A, x, y):
    if A < y < x:
        print("Yes")
    else:
        print("No")
'''


def main():
    A, B, C = [int(x) for x in stdin.readline().split()]
    if A < B:
        if A < C < B:
            print("Yes")
        else:
            print("No")
    else:
        if B < C < A:
            print("Yes")
        else:
            print("No")


if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):
A, B, C = [int(_) for _ 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 C in range(min(A, B), 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')
elif b < a:
  if b < c and c < a:
    print('Yes')
  else:
    print('No')

Solution (Python):
A, B, C = map(int, input().split())
if (A - C) * (C - B) >= 0:
  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 - On the Way
https://atcoder.jp/contests/tenka1-2019-beginner/tasks/tenka1_2019_a

"""
import sys


def solve(A, B, C):
    if A < C < B:
        return 'Yes'
    elif A > C > B:
        return 'Yes'
    return 'No'


def main(args):
    A, B, C = map(int, input().split())
    ans = solve(A, B, C)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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


def main():
    A, B, C = [int(x) for x in stdin.readline().rstrip().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 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())

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

Solution (Python):
def getlist():
	return list(map(int, input().split()))

X = getlist()
Y = sorted(X)
if X[2] == Y[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())
print('Yes' if A<C<B or A>C>B else 'No')

Solution (Python):
a,b,c = map(int,input().split())
if c in range(min(a,b),max(a,b)+1):
  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())
a, b = (a, b) if b > a else (b, a)

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

Solution (Python):
s=list(input().split())
if int(s[0])<int(s[2])<int(s[1]):
        c='Yes'
elif int(s[1])<int(s[2])<int(s[0]):
        c='Yes'
else:
        c='No' 
print(c)

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

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

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

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

ans = min(A, B) < C < max(A, B)

print("Yes" if ans 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):
  ans = 'Yes'
else:
  ans = 'No'

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

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 "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
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a,b,c = na()

print(['No','Yes'][(a-c)*(c-b) > 0])

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

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

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

if(a<b):
	for i in range(a, b):
		if i==c:
			print("Yes")
			exit()
if(a>b):
	for i in range(b, a):
		if i==c:
			print("Yes")
			exit()

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

Solution (Python):
a,b,c=map(int,input().split());print('NYoe s'[(c>a)^(c>b)::2])

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

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

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

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

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

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

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

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

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

if A<B:
    a = A
    b = B
else:
    a = B
    b = A


print('Yes') if a<=C<=b else print('No')

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


norm_A = 0
norm_B = B - A
norm_C = C - A

print('Yes' if abs(norm_B) >= abs(norm_C) and (norm_B * norm_C) > 0 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 = input().strip().split(' ')
a, b, c = [int(a), int(b), int(c)]
if (a < c and b < c) or (a>c and b > c):
    ans = "No"
else:
    ans = "Yes"
print(ans)

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

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

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

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

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

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

Solution (Python):
A, B, C = [int(x) for x in 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())
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())
ans = ''
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 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 = (int(i) for i in input().split())  



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

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

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

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