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:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime,random
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())

A,B,C = inpl()
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 = 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 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 and C < B) or (B < C and C < A)])

Submission status: Accepted

Solution code:
inp = input().split(' ')
a = [int(s) for s in inp]
mi = min(a[:2])
ma = max(a[:2])
if mi <= a[2] <= ma:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
A,B,C =tuple(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 =[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 a < b :
  ans = 'Yes' if a < c and c < b else 'No'

if a > b :
  ans =  'Yes' if b < c and c < a else 'No'

print(ans)

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())
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 = map(int, input().split())
l = [i for i in range(min(a, b), max(a, b) + 1)]
if c in l:
    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:
pos_house = [int(x) for x in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = input().split()
n1 = max(int(i[0]),int(i[1]))
n2 = min(int(i[0]),int(i[1]))
aa = list(range(n2,n1))
#print(int(i[2]) in aa)
#変数 = 真の場合の代入値 if 条件文 else 偽の場合の代入値

ans = ('Yes' if int(i[2]) in aa else 'No')
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    if A < C < B:
        return "Yes"
    elif A > C > B:
        return "Yes"
    else:
        return "No"

print(main())

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 sorted([a,b])[0] < c and c < sorted([a,b])[1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
A,B,C=(int(i) for i in input().split())
if B<=C<=A or A<=C<=B:
  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 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 (b-c)*(c-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:
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")
else:
	 print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

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

else:
    print("No")

Submission status: Accepted

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

if (c-b)*(a-c)>0:#a<c<b or a>c>bならよいので,(a-c)*(c-b)>0となる
  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:
print("YNeos"[(lambda x:x[2]>max(x[0],x[1])or x[2]<min(x[0],x[1]))(list(map(int,input().split())))::2])

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

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

Submission status: Accepted

Solution code:
l = [int(i) for i in input().split()]
l_sorted = sorted(l)
if l[2] == l_sorted[1]:
  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>b and a>c>b or b>a and b>c>a else "No")

Submission status: Accepted

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

c = a[2]

a.sort()

if a[1] == c:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# coding: utf-8

data = list(map(lambda x: int(x), input().split(' ')))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
ab=[i for i in range(min(a,b),max(a,b)+1)]
print('Yes' if c in ab 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 = list(map(int,input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

import sys
import copy

sys.setrecursionlimit(1000000)

# input = sys.stdin.readline

# ~~~~~~~~~~~~~~~~~~~~~_(＾～＾ ｣ ∠)_~~~~~~~~~~~~~~~~~~~~~

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

if A > B:
    A, B = B, A

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def on_the_way(A: int, B: int, C: int)->bool:
    if A > B:
        A, B = B, A
    return A < C and C < B


if __name__ == "__main__":
    A, B, C = map(int, input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    A,B,C = [int(x) for x in input().split()]
    if A < C < B:
        print('Yes')
    elif B < C < A:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b,c = (int(i) for i in 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:
  print("Yes")
elif b<c<a:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

else:
    if 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 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) 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 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 B>=A:
    for i in range(A,B):
        if i == C:
            print("Yes")
            exit()
else:
    for i in range(B,A):
        if i == C:
            print("Yes")
            exit()


print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 21 13:52:24 2019

@author: Yamazaki Kenichi
"""

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

if a > b:
	a, b = b, a

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - On the Way

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 = [int(i) for i 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())

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

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split());print(["No","Yes"][(C>A)^(C>B)])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
intA, intB, intC = map(int, input().split())

if intA < intC < intB or intA > intC > intB:
    print('Yes')
else:
    print("No")

Submission status: Accepted

Solution code:
# TPBC2019A - On the Way
a, b, c = list(map(int, input().rstrip().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 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:
    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())
x = [ [a,0], [b,1], [c,2] ]
x = sorted(x)
if x[1][1] == 2:
    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 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:
#input
#N = list(map(int,input().split()))
#H = list(map(int,input().split()))
[A, B, C] = list(map(int,input().split()))
if max(A,B) >= C and min(A, B) <= C:
    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 = (int(i) for i in input().split())
if c > a and c > b or c < a and c < b:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
a, b, c = list(map(int, input().split()))
print("YNeos"[not (a < c < b or b < c < a) :: 2])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, y, z = map(int, input().split())
print('Yes') if (x - z) * (y - z) < 0 else print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a, b, c = map(int, input().split())

d = a < c
e = b < c

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    ABC = input().split(" ")
    x = [int(x) for x in ABC]

    if (x[0]<x[2] and x[2]<x[1]) or (x[0]>x[2] and x[2]>x[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=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().strip().split(' '))
message = ''
if A > B:
  message = 'Yes' if A > C > B else 'No'
else:
  message = 'Yes' if B > C > A else 'No'
print(message)

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

Submission status: Accepted

Solution code:
print((lambda A,B,C:'Yes'if C in range(*sorted([A,B]))else 'No')(*map(int,input().split())))

Submission status: Accepted

Solution code:
# A
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())
if ((a<c)&(c<b))|((a>c)&(c>b)):
  print ("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
A,B=sorted([A,B])
if C in [i for i in range(A,B)]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

a,b,c = raw_input().split()

a = int(a)
b = int(b)
c = int(c)
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())

p_min = min(a, b)
p_max = max(a, b)
# print(p_min, p_max)
if p_min <= c <= p_max:
    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:
    print('Yes')
elif B < C < A:                                                                     
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
inpl = lambda: map(int,input().split())
A, B, C = inpl()
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):
    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:
def main():
    a, b, c = [int(abc) for abc in input().split(" ")]

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
         
args = list(map(int, input().split()))
             
if (args[0] < args[2] and args[2] < args[1]) or (args[1] < args[2] and args[2] < args[0]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
r_str = input()
r_str = r_str.split()
r = [int(s) for s in r_str]
a = 'Yes'
 
if r[0] <= r[1]:
    if r[0] <= r[2] and r[2] <= r[1]:
        a = 'Yes'
    else:
        a = 'No'
else:
    if r[1] <= r[2] and r[2] <= r[0]:
        a = 'Yes'
    else:
        a = 'No'
 
print(a)

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

Submission status: Accepted

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

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
str = input().split()

str[0] = int(str[0])
str[1] = int(str[1])
str[2] = int(str[2])

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

if str[0] > str[2]:
  if str[1] < str[2]:
    print('Yes')
    exit(0)
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
vals = [int(i) for i in raw_input().split()]
print ("No" if vals[2] in (max(vals), min(vals)) else "Yes")

Submission status: Accepted

Solution code:
import sys

def solve(a, b, c):
    if a > c > b or a < c < b:
        return 'Yes'
    return 'No'

if __name__ == '__main__':

    a, b, c = map(int, sys.stdin.readline().strip().split(" "))
    ans = solve(a, b, c)
    print ans

Submission status: Accepted

Solution code:
x1, x2, x3 = map(int, input().split())
if (x1-x3)*(x2-x3)<0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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!

il = list(map(int,input().split()))


if il[1] <= il[2] <= il[0] or il[0] <= il[2] <= il[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:
points = input()
points = points.split(" ")
a = int(points[0])
b = int(points[1])
c = int(points[2])

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

Submission status: Accepted

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

import sys
input = sys.stdin.readline

def io_generator():
	return input()

#+++++++++++++++++++
def m2(a,b,c):
	min_pos=min(a,b)
	max_pos=max(a,b)
	return (min_pos<=c) and (c<=max_pos)
	
def main(io):
	a,b,c= map(int, io().split())
	return 'Yes' if m2(a,b,c) else 'No'

#++++++++++++++++++++

if __name__ == "__main__":
	io= lambda : io_generator()
	print (main(io))

Submission status: Accepted

Solution code:
s = input().split(" ")
a = int(s[0])
b = int(s[1])
c = int(s[2])
ans = "No"
if a>b:
    if b>c:
        ans="No"
    elif b<c:
        if a>c:
            ans="Yes"
        else:
            ans="No"
else:
    if b<c:
        ans="No"
    elif b>c:
        if a<c:
            ans="Yes"
        else:
            ans="No"
    
print(ans)

Submission status: Accepted

Solution code:
a = input().split(' ')
h1 = int(a[0])
h2 = int(a[1])
h3 = int(a[2])
 
if h1 < h3 and h3 < h2:
  print('Yes')
else:
  if h2 < h3 and h3 < h1:
    print('Yes')
  else:
    print('No')