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:
A, B, C = map(int, input().split())

print(['No', 'Yes'][(A<C and B>C) or (A>C and B<C)])

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:
# coding:utf-8

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(s) for s in input().split()]
if A<C<B or B<C<A:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
inp = [int(n) for n in input().split()]
if (inp[1] - inp[2]) * (inp[0] - inp[2]) < 0:
    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 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 < 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 b <= c <= a:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


print(["No", "Yes"][min(A, B) <= C <= max(A, B)])

Submission status: Accepted

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

if A<C and C<B:
    output = "Yes"
if B<C and C<A:
    output = "Yes"

print(output)

Submission status: Accepted

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


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
# import math
import numpy as np
# N = int(stdin.readline().rstrip().split()[0])
# A = [int(x) for x in stdin.readline().rstrip().split()]
# N, X = [int(x) for x in stdin.readline().rstrip().split()]
# S = stdin.readline().rstrip().split()[0]

A, B, C = [int(x) for x in stdin.readline().rstrip().split()]

AC = A-C
BC = B-C

abc = AC*BC
if abc>=0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

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:
A,B,C = [int(i) for i in input().split()]

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

else:
    if B < C:
        print('Yes')
        exit()

print('No')

Submission status: Accepted

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

if b < c < a:
    print('Yes')
    exit(0)

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

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

Submission status: Accepted

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

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

if B-A > 0 and A < C and C < B:
    print("Yes")
elif B-A < 0 and A > C and C > B:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
"""
python3 a.py < input.txt
"""
import math
import itertools as it
import heapq

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

Submission status: Accepted

Solution code:
from sys import stdin
a, b, c = [int(x) for x in stdin.readline().rstrip().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:
# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

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

Submission status: Accepted

Solution code:
from sys import stdin
import math
import itertools


def makeIntMatrix(lines):
    intMatrix = []
    for a in makeStringMatrix(lines):
        intMatrix.append([int(b) for b in a])
    return intMatrix
 
 
def makeStringMatrix(lines):
    stringMatrix = [line.split() for line in lines]
    return stringMatrix
 
 
def makeInt(line):
    return int(line.rstrip())
 
 
def makeMultiInteger(line):
    return [int(x) for x in line.rstrip().split()]


def solve(input_string):
    a, b, c = makeMultiInteger(input_string[0])
    #print(a, b, c)
    if a >= c and b <= c:
        return "Yes"
    if b >= c and a <= c:
        return "Yes"
    return "No"


def main():
    input_lines = stdin.readlines()
    answer = solve(input_lines)
    print(answer)


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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
M=max(A,B)
m=min(A,B)
if m<C and C<M:
  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() ]

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if a>c and b <c:
    answer = 'Yes'

print(answer)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

start = min((A, B))
end = max((A, B))

if start <= C and C<= end:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

if m<=c and n>=c:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def main():
    A, B, C = list(map(int, input().split()))
    print('YNeos'[not(min(A, B) < C < max(A, B))::2])


main()

Submission status: Accepted

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

main()

Submission status: Accepted

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

if(a > b):
	temp = a
	a = b
	b = temp

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

Submission status: Accepted

Solution code:
from sys import stdin

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

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

input = lambda: stdin.readline()
main()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

D = max([A, B])
E = min([A, B])
if E <= C <= D:
  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:
def solve():
  a,b,c= (int(i) for i in input().split())
  if a<= c and b >= c:
    print('Yes')
  elif a >= c and b <= c:
    print('Yes')
  else:
    print('No')

solve()

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

print("No")

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    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 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)==C or max(A,B,C)==C:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

x = min([a,b])
y = max([a,b])

if x <= c and c <= y:
    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 = [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-c)<0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
x = [int(c) for c in input().split()]
if (x[0]<x[2] and x[2]<x[1]) or (x[1]<x[2] and x[2]<x[0]):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

ABC = input().split(' ')
A = int(ABC[0])
B = int(ABC[1])
C = int(ABC[2])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
from sys import exit
A,B,C = [int(n) for n in input().split()]
# N = int(input())
# a = [int(input()) for _ in range(N)]
# S = str(input())
# L = len(S)
# T = str(input())
# exit()
if( A<= C and C <=B) or (B <= C and C <= A):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = s_inpl()   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = inpl()	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]

import math
import copy
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
from bisect import bisect_left, bisect_right
# import numpy as np

# 四方向
dy = [0, 0, 1, -1]
dx = [1, -1, 0, 0]
INF = float("inf")

def i_inpl(): return int(input())
def s_inpl(): return map(int,input().split())
def l_inpl(): return list(map(int, input().split()))

a, b, c = s_inpl()

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

right = max(A, B)
left = min(A, B)

if left < C and C < right:
    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[0] >= a[2] >= a[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 and C<B)or(A>C and C>B):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

A, B, C = map(int, input().rstrip().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:
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:
# coding:utf-8

def main():
    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")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
import numpy as np

readInt = lambda: int(sys.stdin.readline())
readIntN = lambda: [int(v) for v in sys.stdin.readline().split(' ')]

a, b, c = readIntN()
minv = min(a, b)
maxv = max(a, b)
ret = 'Yes' if minv < c < maxv else 'No'
print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
#A=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 = [int(x) for x in 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 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 <= B or B<= C<= A) 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())

flag = False
if a<=c and c<=b:
    flag = True

if b<=c and c<=a:
    flag = True


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#d=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
#import numpy as np
import math
#n=int(input())
#li=input().split()
#S=input()
#import fractions
#n=int(input())

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

if lis[0]<lis[2] and lis[1]>lis[2]:
    ans="Yes"
elif lis[0]>lis[2] and lis[1]<lis[2]:
    ans="Yes"
else:
    ans="No"

print(ans)

Submission status: Accepted

Solution code:
a,b,c = list(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()]
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 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 b >= c):
  print('Yes')
elif (b <= c and a >= c):
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def MI(): return map(int, input().split())
def II(): return int(input())
def IS(): return input()
def LI(): return list(map(int, input().split()))

a,b,c, = MI()
print('Yes') if a <= c <= b or b <= c <= a else print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ns():
    import sys
    return map(int, sys.stdin.readline().split())
  
a, b, c = ns()
if a < c < b or b < c < a:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = [int(v) for v in 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 = 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 (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().split(' '))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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