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

Submission status: Accepted

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

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

if result:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(main())

Submission status: Accepted

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

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 < 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 = input()
a = list(map(int, a.split(' ')))

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

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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
s_data = stdin.readline().rstrip().split()
data = [int(itr) for itr in s_data]
A = data[0]
B = data[1]
C = data[2]
if (B <= C and C <= A) or (A <= C and C <= B):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

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 = [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")

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
A = list(map(int,input().split()))
#print(A)
 
if A[0]>A[2]>A[1] or A[0] < A[2] < A[1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
# coding: utf-8
# Your code here!
'''
n=int(input())
s=input()
k=int(input())
'''
a,b,c=map(int,input().split())
'''
a=[int(i) in range(n)]
a=[0]*n
for i in range(n):
    a.append(int(i))
'''
if (a<=c and c<=b) or (b<=c and c<=a):
    ans='Yes'
else:
    ans='No'
print(ans)

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

if zahyo_sorted.index(zahyo[2]) == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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


print(co)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
zahyou = list(map(int, input().split()))

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

print('No')

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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 c in range(min(a,b),max(a,b)) else "No")

Submission status: Accepted

Solution code:
import sys
# gcd
# from fractions import gcd
# 切り上げ，切り捨て
# from math import ceil, floor
# リストの真のコピー（変更が伝播しない）
# from copy import deepcopy
# 累積和。list(accumulate(A))としてAの累積和
# from itertools import accumulate
# l = ['a', 'b', 'b', 'c', 'b', 'a', 'c', 'c', 'b', 'c', 'b', 'a']
# S = Counter(l)  # カウンタークラスが作られる。S=Counter({'b': 5, 'c': 4, 'a': 3})
# print(S.most_common(2))  # [('b', 5), ('c', 4)]
# print(S.keys())  # dict_keys(['a', 'b', 'c'])
# print(S.values())  # dict_values([3, 5, 4])
# print(S.items())  # dict_items([('a', 3), ('b', 5), ('c', 4)])
# from collections import Counter
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
# template


A, B, C = mi()
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:
import sys

l = raw_input().split()
a = int(l[0])
b = int(l[1])
c = int(l[2])

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    A,B,C = map(int, lines.pop(0).split(' '))
    if min(A,B) < C and C < max(A,B):
        print('Yes')
    else:
        print('No')
lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Submission status: Accepted

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

from sys import stdin
    
def main():
    a,b,c = [int(x) for x in stdin.readline().rstrip().split()]
    if a < c and c < b:
        print('Yes')
    elif b < c and c < a:
        print('Yes')
    else:
        print('No')

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#A - On the Way

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

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())
ans = "No"

if A <= C and C <= B:
    ans = "Yes"
if B <= C and C <= A:
    ans = "Yes"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
abc = input().split(" ")
a = int(abc[0])
b = int(abc[2])
c = int(abc[1])
if (a - b)*(b - c)>0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
l = [a, b, c]
l.sort()

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

Submission status: Accepted

Solution code:
A, B, C = [int(x) for x in 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())
count = 0
list1 = [A,B]

for i in range(min(list1),max(list1)):
    if C == i:
        count = 1
 
if count == 1:
    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 = list(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, raw_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 and c<b:
    print("Yes")
elif c<a and b<c:
    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 =[int(i) for i in input().split()]

a1 = a[0]
a2 = a[1]
a3 = a[2]


if a1 < a3 < a2:
    print('Yes')
elif a2 < a3 < a1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
#coding:utf-8
a,b,c = list(map(int,input().split()))
if a < c and b > c:
    print ("Yes")
elif b < c and a > c:
    print ("Yes")
else:
    print ("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
# スペース区切りの整数の入力
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:
from collections import defaultdict
from string import ascii_uppercase
import sys, bisect, math
stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

N = read_int()

def solve():
    if (N[0] < N[2] and N[1] > N[2]) or (N[0] > N[2] and N[1] < N[2]):
        return True
    return False

if __name__ == "__main__":
    if solve():
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, b ,c = map(int, input().split())
if a>b:
    tmp=a
    a=b
    b=tmp
if a < c and b > c:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
a, b, c = (int(_) for _ in input().split())  

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

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

Submission status: Accepted

Solution code:
import sys

a, b, c = list(map(int, sys.stdin.readline().strip().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:
a,b,c = map(int,input().split())
if min(a,b)<c and max(a,b)>c:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
A,B,C = [int(x) for x in 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())

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

Submission status: Accepted

Solution code:
a,b,c = map(int, input().split())
ab = [a,b]
ab.sort()
l = list(range(ab[0],ab[1]))
if c in l:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
A,B,C = list(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")

Submission status: Accepted

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

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

Submission status: Accepted

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

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 a > b:
    d = a
    a = b
    b = d

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

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

Submission status: Accepted

Solution code:
A,B,C = list(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")

Submission status: Accepted

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

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

a, b, c = map(int, sys.stdin.readline().split())
if max(a, b) > c and min(a, b) < c:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

aa=min(a,b)
bb=max(a,b)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    input_list = list(map(int, input().split()))

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

if min_n < C and max_n > C:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read() for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

a, b, c = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, C = list(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, raw_input().split())
if B<A:
	A,B=B,A

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

Submission status: Accepted

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

if (A[0] - A[2]) * (A[1] - A[2]) < 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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:
[a,b,c]=[int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
ABC=input().split()
A = int(ABC[0]);B = int(ABC[1]);C = int(ABC[2])


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

Submission status: Accepted

Solution code:
A,B,C = [int(i) for i in input().split()]
if 0 <= A and B and C <=100:
    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())
flag = False
if a < c and c < b:
    flag = True
elif b < c and c < a:
    flag = True
if flag:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys
a,b,c=map(int,input().split())
n=1;k=b+1
if a>b:
        n=-1
        k=b-1
for i in range(a,k,n):
        if i==c:
                print("Yes")
                sys.exit()
print("No")

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
if A < B:
    small = A
    large = B

else:
    small = B
    large = A

if small < C < large:
    print('Yes')

else:
    print('No')

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline



def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [A, B, C] = [int(input_raw[0]), int(input_raw[1]), int(input_raw[2])]
    if A < B and A < C and C < B:
        print "Yes"
        return
    if B < A and A > C and B < C:
        print "Yes"
        return
    print "No"



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
mn = min(A, B)
mx = max(A, B)
if mn < C and C < mx:
    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 < 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 and C <B) or (B< C and C<A):
    ans = "Yes"
else:
    ans= "No"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/tenka1-2019-beginner
# -*- coding: utf-8 -*-

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


main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

if (A < C) & (C < B):
    print('Yes')
    exit()

if (A > C) & (C > B):
    print('Yes')
    exit()
# else:
#     print('No')

print('No')

Submission status: Accepted

Solution code:
a,b,c=list(map(int,input().split()))
r="No"
if a>b:
    for i in range(b,a):
        if i==c:
            r="Yes"
else:
    for i in range(a,b):
        if i==c:
            r="Yes"
print(r)

Submission status: Accepted

Solution code:
import sys
import math
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, input().split()))
ns = lambda: input()
A,B,C = na()

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

Submission status: Accepted

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

if min(A, B) <= C and max(A, B) >= C:
    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())
l = max(a,b)
m = min(a,b)
for i in range(m,l+1):
  if i==c:
    print("Yes")
    exit()
print("No")