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

A = l[0]
B = l[1]
C = l[2]

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

Submission status: Accepted

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

if b * c > 0 and abs(b) > abs(c):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
input_str = input()
homes = input_str.split(" ")
for i, home in enumerate(homes):
    homes[i] = int(home)
if ((homes[2] - homes[1]) * (homes[2] - homes[0]) < 0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
input = input()
splited = input.split(" ")
a = int(splited[0])
b = int(splited[1])
c = int(splited[2])
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 (min(A,B) < C and C < max(A,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-c)<0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

A=int(A)
B=int(B)
C=int(C)

AB=abs(A-B)
ACB=abs(A-C)+abs(C-B)

if AB==ACB:
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
data =[int(s) for s in input().split()]

if data[0] <= data[1]:
  if data[1] >= data[2] and data[0] <= data[2]:
    print("Yes")
  else:
    print("No")
else:
  if data[1] <= data[2] and data[0] >= data[2]:
    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:
ABC = input().split()
list_ABC = list(ABC)
A = int(list_ABC[0])
B = int(list_ABC[1])
C = int(list_ABC[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:
a, b, c = map(int, input().split(' '))

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

Submission status: Accepted

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

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 > b:
    tmp = a
    a = b
    b = tmp
for i in range(a, b):
    if i == c:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inputs = list(map(int,input().split()))
if inputs[0] < inputs[2] < inputs[1] or inputs[0] > inputs[2] > inputs[1]:
    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())
z=0

if a<b:
    if a<c:
        if b>c:
            z=1
else:
    if a>c:
        if b<c:
            z=1

if z==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())

print("Yes") if abs(A-C)<=abs(A-B) and (A<C<B or A>C>B) else print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
inp=input()

line=inp.split(" ")

a=int(line[0])
b=int(line[1])
c=int(line[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 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:
    ans ='Yes'
else:
    ans = 'No'

print(ans)

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())
if A>C & C>B:
	print("Yes")
if B>C & C>A:
   	print("Yes")
if C>A & A>B:
	print("No")
if B>A & A>C:
	print("No")
if A>B & B>C:
	print("No")
if C>B & B>A:
	print("No")

Submission status: Accepted

Solution code:
i = list(map(int, input().split())) #i_1 i_2 1_3を取得し、iに値を入れる

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

Submission status: Accepted

Solution code:
a,b,c= input().split()
array = sorted([int(a),int(b),int(c)])
print(["No","Yes"][array.index(int(c))== 1])

Submission status: Accepted

Solution code:
A, B, C = (int(i) for i in 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())
last=max(A,B)
first=min(A,B)
if C <= last and first <= C:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
a, b, c = [int(n) for n 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())

road = list(range(A + 1, B)) if A < B else list(range(B + 1, A))
if C in road:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

if (abc[0] < abc[1] and abc[1] > abc[2] and abc[0] < abc[2]) or (abc[0] > abc[1] and abc[1] < abc[2] and abc[0] > abc[2]):
    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 A > B:
    if A > C and B < C:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():
    argv = input().split()
    A = int(argv[0])
    B = int(argv[1])
    C = int(argv[2])
    print(judge(A, B, C))

def judge(A, B, C):
    if (A < C and C < B) or (C < A and B < C):
        return 'Yes'
    else:
        return 'No'

if __name__ == '__main__':
    main()

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:
import sys
a, b, c = map(int, input().split())
 
if a > b:
  for i in range(b, a):
    if i == c:
      print('Yes')
      sys.exit(0)
else:
  for i in range(a, b):
    if i == c:
      print('Yes')
      sys.exit(0)

print('No')

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
list_1 = [a,b,c]
m = min(list_1)
M = max(list_1)
if (c!=m) and (c!=M):
    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 C<B and B<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 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:
 print("Yes")
elif B<C<A:
 print("Yes")
else:
 print("No")

Submission status: Accepted

Solution code:
N = [int(i) for i in input().split()]
M = (N[0]-N[2])*(N[1]-N[2])
if  M > 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

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:
data = input()
split = data.split(' ')
a = int(split[0])
b = int(split[1])
c = int(split[2])

if b < a:
    a, b = b, a

for i in range(a, b):
    judge = 'No'
    if i == c:
        judge = 'Yes'
        break

print(judge)

Submission status: Accepted

Solution code:
x,y,z=map(int,input().split())
if x<y:
    if y>z:
        if z>x:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
elif x>y:
    if y<z:
        if x>z:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
def check_between(a,b,c):
    if  (b < c) and (c < a) :
        print('Yes')
    elif (a < c) and (c <b) :
        print('Yes')
    else:
        print('No')

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

Submission status: Accepted

Solution code:
A,B,C= list(map(int,input().strip().split(" ")))
if A < C< B:
 print('Yes')
elif B < 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 <= B) or (A >= C >= B):
    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:
l = [int(i) for i in input().split(' ')]
if ((l[0] < l[2]) and (l[2] < l[1])) or ((l[1] < l[2]) and (l[2] < l[0])):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

upper= max(a[0],a[1])
lower= min(a[0],a[1])

if upper >= a[2] and lower<= a[2]:
  print "Yes"
else:
  print "No"

Submission status: Accepted

Solution code:
import sys
 
inp = map(int, raw_input().strip().split(" "))
 

if inp[0] > inp[2] and inp[2] > inp[1]:
    print("Yes")
elif inp[1] > inp[2] and inp[2] > inp[0]:
    print("Yes")
else:
    print("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 a > c > b:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
a = []
for l in sys.stdin:
    a.append(l)

zahyou = [int(x) for x in a[0].split()]
a, b, c = zahyou
if max(zahyou) == c or min(zahyou) == c:
    print("No")
else:
    print("Yes")

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:
pos_in = input().split()
pos = [int(s) for s in pos_in]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main(inp):
  a,b,c=map(int,next(inp).split())
  if((a-c)*(b-c)<0): print("Yes")
  else: print("No")
    
main(sys.stdin)

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:
l = list(map(int, input().split(' ')))
tmp = l[2]
l.sort()
if(l[1] == tmp):
    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 & c<=b):
    print('Yes')
elif(a>=c & c>=b):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

a != b
b != c
c != a

1 <= a <= 100
1 <= b <= 100
1 <= c <= 100

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

Submission status: Accepted

Solution code:
abc=list(map(int,input().split()))
if max(abc)==abc[0] and min(abc)==abc[1] or max(abc)==abc[1] and min(abc)==abc[0]:
  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 < B:
    print('Yes')
elif B < C < A:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
in_list = input().split()

for i in range(len(in_list)):
    in_list[i] = int(in_list[i])

if max(in_list) == in_list[2] or min(in_list) == in_list[2]:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, b, c = map(int,(input().split()))
t = (c - a) / (b - a)
if 0 < t < 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

if 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:
import sys

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

Submission status: Accepted

Solution code:
import numpy as np
huga = list(map(int, input().split()))
a=huga[0]
b=huga[1]
c=huga[2]
if a>b:
  x=a
  a=b
  b=x
        
      
if a<c and b>c:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
btn=input().split()
A=int(btn[0])
B=int(btn[1])
C=int(btn[2])
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 > 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:
 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 == min(a,b,c):
 print('No')
elif c == max(a,b,c):
 print('No')
else:
 print('Yes')

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

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

Submission status: Accepted

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


from sys import stdin



############################################


# read data for n sequences.
n = stdin.readline().split()
a = int(n[0])
b = int(n[1])
c = int(n[2])
#data = [int(stdin.readline().rstrip()) for _ in range(n)]

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if abs(pos_list[0] - pos_list[1]) > abs(pos_list[0] - pos_list[2]) and \
    (pos_list[0] - pos_list[1]) * (pos_list[0] - pos_list[2]) > 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
if a[2]==max(a) or a[2] == min(a):
    print('No')
else:
    print('Yes')

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:
b=[int(i) for i in input().split()]
if (b[0]<b[2] and b[2]<b[1]) or (b[0]>b[2] and b[2]>b[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:
import sys

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

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

Submission status: Accepted

Solution code:
ABC = [int(i) for i in input().split()]
answer = ""
if((ABC[2] > ABC[0] and ABC[2] < ABC[1]) or (ABC[2] < ABC[0] and ABC[2] > ABC[1])):
    answer = "Yes"
else:
    answer = "No"
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

tmp_max = max(A,B)
tmp_min = min(A,B)
A = tmp_min
B = tmp_max

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

def max(a,b):
    if a > b:
        return a
    else:
        return b

def min(a,b):
    if a < b :
        return a
    else:
        return b

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 > B:
    A, B = B, A

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

Submission status: Accepted

Solution code:
s = [int(i) for i in input().split(" ")]
count = 0

if s[0] < s[1]:
    for i in range(s[0], s[1]):
        if i == s[2]:
            print("Yes")
            count = 1
            break

else:
    for i in range(s[1], s[0]):
        if i == s[2]:
            print("Yes")
            count = 1
            break

if count == 0:
    print("No")

Submission status: Accepted

Solution code:
x=input().split()
z=[int(v) for v in x]

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

Submission status: Accepted

Solution code:
import sys
def p(*a):
  s=" ".join(map(str,a))
  #print(s)
  sys.stderr.write(s+"\n")


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

p(a,b,c)

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
kazu = input().split()
for i in range(len(kazu)):
    kazu[i] = int(kazu[i])
if kazu[0] < kazu[1]:
    if kazu[0] < kazu[2] and kazu[1] > kazu[2]:
        print("Yes")
    else:
        print("No")
elif kazu[0] > kazu[1]:
    if kazu[0] > kazu[2] and kazu[1] < kazu[2]:
        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 = (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, (raw_input().split(" ")))

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

Submission status: Accepted

Solution code:
n=list(map(int,input().split()))
m=sorted(n)
if n[2]==m[1]:
    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((C>A)and(B>C))or((A>C)and(C>B)):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import os

x,y,z = [int(i) for i in input().split(' ')]

if x > y:
    x,y = y,x

if x < z < y:
    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:
# coding: utf-8
# Your code here!

inp = input().split()

a = int(inp[0])
b = int(inp[1])
c = int(inp[2])

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 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 > b:
    items = range(b, a)
else:
    items = range(a, b)
if c in items:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
AB_list = [int(i) for i in range(min(A, B), max(A, B))]

print("Yes" if C in AB_list else "No")

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
 
a,b,c=map(int,input().split())

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

Submission status: Accepted

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

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

# +に進む
if A < B:
    if A < C < B:
        print('Yes')
        sys.exit()
    print('No')
    sys.exit()

# -に進む
if A > B:
    if B < C < A:
        print('Yes')
        sys.exit()
    print('No')
    sys.exit()

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問題
a, b, c = map(int, input().split())
if a >= b:
    tmp = b
    b = a
    a = tmp

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

Submission status: Accepted

Solution code:
# coding: utf-8

intA, intB, intC = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

# 文字の読み込み
st = input().split()
i = [ int(x) for x in st]

del0 = abs(i[0]-i[1])
del1 = abs(i[1]-i[2])
del2 = abs(i[2]-i[0])

if del0 == del1+del2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
a = input()
aSplit = a.split(' ')
A = int(aSplit[0])
B = int(aSplit[1])
C = int(aSplit[2])
# a[0] = int(input())
# a[1] = int(input())
# a[2] = int(input())
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,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 C <= B :
    print("Yes")
elif B <= C and C <= A :
    print("Yes")
else:
    print("No")

Submission status: Accepted

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