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






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)



def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


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


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count




A,B,C = IL()

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) * (C-B) > 0:
  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):
x, y ,z = map(int,input().split())

if min(x,y) < z < max(x,y):
    print("Yes")
else:
    print("No")

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

Solution (Python):
_input = input().split(" ")
_A = int(_input[0])
_B = int(_input[1])
_C = int(_input[2])

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):
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


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

if __name__ == '__main__':
    main()

Solution (Python):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**6)
INF = float('inf')
MOD = 10 ** 9 + 7
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rf(): return float(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]
def rf_(): return [float(_) for _ in rs().split()]
def divisors(n, sortedresult=True):
    div = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            div.append(i)
            if i != n // i:
                div.append(n//i)
    if sortedresult:
        div.sort()
    return div

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

Solution (Python):
from statistics import median


from fractions import gcd
from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










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

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys
import math
import bisect

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

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

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0
a,b,c = map(int,readline().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())

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

else:
    print("No")

Solution (Python):
import sys

input = sys.stdin.readline


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

    if A < B:
        if A < C < B:
            ans = "Yes"
        else:
            ans = "No"
    else:
        if B < C < A:
            ans = "Yes"
        else:
            ans = "No"

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import sys
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]



A, B, C = mi()

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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

if __name__ == '__main__':
    resolve()

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

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

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


if False:
    N,K=map(int,input().split())
    print('YES' if N-K-(K-1)>=0 else 'NO')



if False:
    N=int(input())
    S=input()
    print('Yes' if S.count('R')>S.count('B') else 'No')



if False:
    print('Yes' if len(set(input().split()))==1 else 'No')



if False:
    N=int(input())
    S=input()
    K=int(input())
    r=S[K-1]
    ans=''
    for s in S:
        if s==r: ans+=s
        else: ans+='*'
    print(ans)



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

Solution (Python):
l = list(map(int, input().split()))
C = l[2]
l.sort()

if l[1] == C:
    print('Yes')
else:
    print('No')

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

if __name__=='__main__':
    main()

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

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

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

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

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

maxi=max(A,B,C)
mini=min(A,B,C)
if C!=maxi and C!=mini:
  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())
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 = (int(x) for x in input().split())
if a<c<b or b<c<a:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

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

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
a,b,c = iim()

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

Solution (Python):
A = [int(x) for x in input().split()]
a = list(sorted(A))
print("Yes" if A[2] == a[1] else "No")

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

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

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

if a < c < 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())
for i in range(min(a,b)+1, max(a,b)):
    if i == c:
        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 < 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 = map(int, input().split())
print("Yes" if A <= C and C <= B or B <= C and C <= A else "No")

Solution (Python):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B, C = list(map(int, sys.stdin.buffer.readline().split()))

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

Solution (Python):
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')

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());print("NYoe s"[a<c<b or a>c>b::2])

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 a>c>b else 'No')

Solution (Python):
*s, t = map(int, input().split())
s.sort()
f = False
for i in range(s[0],s[1]+1):
  if i == t:
    f = True
print("Yes") if f 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 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(ans)

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):
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 < 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)
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,b,c=map(int,input().split())
l=sorted([a,b,c])
print("Yes" if l[1]==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())
l=[A,B,C]
l.sort()

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

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








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

Solution (Python):




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


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

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

Solution (Python):
a,b,c=map(int,input().split())
if c in list(range(min(a,b),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("NYoe s"[a<=c<=b or b<=c<=a::2])

Solution (Python):


a, b, c = [int(x) for x 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())
print('Yes' if a<c<b or a>c>b else 'No')

Solution (Python):

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

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

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

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

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

 
import math
import itertools
import sys
import copy
 






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

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

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

a,b,c = [int(x) for x in stdin.readline().rstrip().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 = 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<=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):
def main(a: int, b: int, c: int):
    if a < c < b:
        print('Yes')
    elif a > c > b:
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    a, b, c = map(int, input().split())

    main(a, b, 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 = 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 "No")

Solution (Python):

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

Solution (Python):
from sys import stdin
import sys

def ria(sep = ''):
    if sep == '' :
        return list(map(int, input().split())) 
    else: return list(map(int, input().split(sep)))
def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()

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


if __name__ == "__main__":
    main()

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

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

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

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

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

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):
l=list(map(int,input().split()))
if max(l)!=l[2] and min(l)!=l[2]:
  print("Yes")
else:
  print("No")

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

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

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

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

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

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, c = list(map(int, readline().split()))
    print("Yes" if a < c < b or a > c > b else "No")


if __name__ == '__main__':
    solve()

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

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

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

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

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

Solution (Python):

import sys


def main():
    a, b, c = map(int, sys.stdin.readline().split())
    if a < c < b or a > c > b:
        ans = 'Yes'
    else:
        ans = 'No'
    
    print(ans)

if __name__ == '__main__':
    main()

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