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



Sample input:
3 8 5


Sample output:
Yes

Submission status: Accepted

Solution code:
'''
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()

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#Tenka1 Programmer Beginner Contest 2019 a
a,b,c=map(int,input().split())
if (a<c and c<b) or (b<c and c<a): 
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C = map(int, open(0).read().split())
if A <= C <= B:
    print("Yes")
elif A >= C >= B:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
x = sorted([a,b,c])
ans = "No"

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

Submission status: Accepted

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

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

else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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()

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
V = sorted([A, B, C])
ans = 'Yes' if V[1] == C else 'No'
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union
# import time
# import math, cmath
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import _heapify_max, _heappop_max, _siftdown_max
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import Fraction               # Fraction(a, b) => a / b ∈ Q. note: Fraction(0.1) do not returns Fraciton(1, 10). Fraction('0.1') returns Fraction(1, 10)



def main():
    Num = Union[int, float]
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79e+308
    # inf = 2 ** 63 - 1             # (for fast JIT compile in PyPy) 9.22e+18
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    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())
    # def _heappush_max(h, item): h.append(item); _siftdown_max(h, 0, len(h)-1)
    
    
    a, b, c = mi()
    print('Yes') if a < c < b or a > c > b else print('No')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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#, log2
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
#from decimal import *

A, B, C = MAP()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache


#############
# Constants #
#############

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

#############
# Functions #
#############

######INPUT######
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)]

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

#####Shorten#####
def DD(arg): return defaultdict(arg)


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

######Combination######
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

######Factorization######
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

#####MakeDivisors######
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

#####MakePrimes######
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

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

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

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

#####ChangeBase#####
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))))

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

#############
# Main Code #
#############
A,B,C = IL()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, y ,z = map(int,input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_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")

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
# region header
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
# endregion
A, B, C = ri_()
print('Yes' if A < C < B or B < C < A else 'No')

Submission status: Accepted

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

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

else:
    print("No")

Submission status: Accepted

Solution code:
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()