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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

    return a, b, c



if __name__ == '__main__':
    a, b, c = read_input()

    start = min(a, b)
    end = max(a, b)

    if start < c < end:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if A > B:
    A,B = B,A
if C in range(A,B+1):
    ans = "Yes"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ABC = input().split()
if (int(ABC[0]) < int(ABC[2]) < int(ABC[1])) or (int(ABC[1]) < int(ABC[2]) < int(ABC[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 = [int(c) for c in input().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if A < B:
    if C in range(A, B):
        print("Yes")
    else:
        print("No")
else:
    if C in range(B, A):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
# /usr/bin/python
# -*- coding: utf-8 -*-
import sys
import math


a,b,c = map(int, sys.stdin.readline().rstrip().split())
s = sorted([a,b,c]) 
if s[1] == c:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from math import ceil, floor
from sys import setrecursionlimit

import heapq
import itertools
import operator


# globals
inf = float('inf')
N = 0


def set_inputs():
    global N
    return


def main():
    setrecursionlimit(100000)
    set_inputs()
    # ----------MAIN----------
    a, b, c = get_li()
    if a < c < b or a > c > b:
        print("Yes")
    else:
        print("No")
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def get_data(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    main()

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

if (A<B and A<C) or (A>B and A>C):
  AB_a = abs(AB)
  AC_a = abs(AC)
  if AB_a < AC_a:
    print('No')
  else:
    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 = tuple([int(x) for x in input().split(' ')])

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

if a < c < b or b < c < a:
    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]

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

Submission status: Accepted

Solution code:
inp = [int(f) for f in input().split()]
if inp[0] > inp[2]:
    if inp[1] < inp[2]:
        print('Yes')
    else:
        print('No')
elif inp[0] < inp[2]:
    if inp[1] > inp[2]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
l = list(map(int,input().split()))
s1 = set(list(range(max(l[0],l[1])+1)))
s2 = set(list(range(min(l[1],l[0])+1)))

s3 = s1 - s2
if l[2] in s3: 
    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<C and B<C:
  print('No')
elif A>C and B>C:
  print('No')
else:
  print('Yes')

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#a.py
A,B,C = map(int,input().split())
if A < C and C < B:
  print('Yes')
  exit()
if B < C and C < A:
  print('Yes')
  exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
argA,argB,argC = list(map(int,input().split()))

if argA > argB:
  if argA > argC and argC > argB:
    print("Yes")
  else:
    print("No")
else:
  if argB > argC and argC > argA:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=[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,B,C = map(int,input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
A,B,C = [int(x) for x in 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:
import sys

input = sys.stdin.readline


def main():
    a, b, c = [int(i) for i in input().split()]
    min_ = min([a, b])
    max_ = max([a, b])
    print("Yes" if min_ <= c <= max_ else "No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
A, B, C = [int(s) for s 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:
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 = input().split()
A = int(A)
B = int(B)
C = int(C)
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())
 
min_h = min(A,B)
max_h = max(A,B)
if min_h<=C and C<=max_h:
    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 = [int(x) for x in 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())
print('Yes') if ((A<C and C<B) or (A>C and C>B)) else print ('No')

Submission status: Accepted

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

if min(a_c[0], a_c[1]) < a_c[2] < max(a_c[0], a_c[1]):
    print("Yes")

else:
    print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
li = list(map(int, input().split()))
A = li[0]
B = li[1]
C = li[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())
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:
def main():
    A, B, C = map(int, input().split())

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

Submission status: Accepted

Solution code:
start, goal, point = list(map(int, input().split()))

if (start - point) * (goal - point) <= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n=input().split()
for i in range(3):
    n[i]=int(n[i])
if n[0]<n[2]<n[1] or n[1]<n[2]<n[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 b > c:
        print('Yes')
    else:
        print('No')
else:
    if 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 :
    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 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 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())
for i in range(min(A, B), max(A, B)+1):
    if i == C:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
a,b,c=[int(x) for x in input().split()]
print(["No","Yes"][c<=max(a,b) and c>=min(a,b)])

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:
s = input().split()
s = [int(i) for i in s]
if ((s[0] < s[2]) and (s[2] < s[1])) or ((s[0] > s[2]) and (s[2] > s[1])):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
from sys import stdin
a, b, c = [int(x) for x in stdin.readline().rstrip().split()]
if (a < c) & (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())
if a<c and c<b:
    print("Yes")
elif a>c and c>b:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
A, B, C = map(int, input().split())

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

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:
s = [int(i) for i in input().split(' ')]
if s[2] > s[0] and s[2] < s[1]:
    print("Yes")
elif s[2] < s[0] and s[2] > s[1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
a,b,c = [int(_) for _ in stdin.readline().rstrip().split()]
if a <= b:
    print('Yes' if c in [i for i in range(a,b+1)] else 'No')
else:
    print('Yes' if c in [i for i in range(b,a+1)[::-1]] else '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:
def main(num_1, num_2, num_3):
    if (num_3 > num_1 and num_3 > num_2) or (num_3 < num_1 and num_3 < num_2):
        return 'No'
    else:
        return 'Yes'


if __name__ == "__main__":
    num_1, num_2, num_3 = list(map(int, input().split()))
    print(main(num_1, num_2, num_3))

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 = ( int(i) for i in 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) 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:
from sys import stdin
A, B, C = [int(x) for x in stdin.readline().rstrip().split()]
if (A < B and A < C and C < B) or (A > B and 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 A<C and C<B:
    print('Yes')
elif B<C and C<A:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

result = 'Yes'
t = min(a,b)
u = max(a,b)
if c > t and c < u:
    print(result)
else :
    result = 'No'
    print(result)

Submission status: Accepted

Solution code:
def main():
    a, b, c = map(int, input().split())
    if min(a, b, c) == a and max(a, b, c) == b:
        return 'Yes'
    if min(a, b, c) == b and max(a, b, c) == a:
        return 'Yes'
    return 'No'
print(main())

Submission status: Accepted

Solution code:
a = [int(x) for x in 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:

# coding: utf-8

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

Submission status: Accepted

Solution code:
A, B, C = map(int, raw_input().split())
if (A < C < B) | (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:
        if c < b:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    if b < c:
        if c < a:
            print('Yes')
        else:
            print('No')
    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 = list(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:
s = input().split(" ")
s = [int(s[i]) for i in range(3)]
A = s[0]
B = s[1]
C = s[2]
minPoint = min(A , B)
maxPoint = max(A, B)
if minPoint < C and C < maxPoint : 
    print("Yes")
else : 
    print("No")

Submission status: Accepted

Solution code:
A = input().split()
B = int(A[1])
C = int(A[2])
A = int(A[0])
if A<C & C<B or A>C & C>B:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

if c in range(min(a,b),max(a,b)):
	print("Yes")
else:
	print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h1, h2, d = list(map(int, (input().split())))

if(h1 > h2):
    temp = h2
    h2 = h1
    h1 = temp

if(d >= h1 and d <= h2):
    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:
#!/usr/bin/env python3

import re

n = input()
n = re.split(" ",n)

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

Submission status: Accepted

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

# スペース区切りの整数の入力
A,B,C = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a1,b1,c1 = input().split()
a = int(a1)
b = int(b1)
c = int(c1)
if a < b and a<c and c<b:
	print('Yes')
elif a > b and a>c and c>b :
	print('Yes')
else :
	print ('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(int, input().split())  # -> x=1, y=2

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

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

Submission status: Accepted

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

if A < C and C < B:
    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())
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:
    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:
input = list(map(lambda x: int(x), input().split(' ')))

a = input[0]
b = input[1]
c = input[2]

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

Submission status: Accepted

Solution code:
def main():
    ABC = list(map(int, input().split()))
    A, B, C = ABC[0], ABC[1], ABC[2]
    if A < C:
        if C < B:
            print('Yes')
        else:
            print('No')
    if A > C:
        if C > B:
            print('Yes')
        else:
            print('No')
main()

Submission status: Accepted

Solution code:
list1 = list(map(int,input().split()))
if(list1[2]<=list1[1] and list1[2]>=list1[0]):
    print("Yes")
elif(list1[2]>=list1[1] and list1[2]<=list1[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())
MapList = [A,B,C]
MapList.sort()
if MapList[1] == C :
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

if (A>B) :
    tmp = A
    A = B
    B = tmp

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

Submission status: Accepted

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

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

else:
    print('No')

Submission status: Accepted

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

t = False
if (N[0] < N[1]) == (N[0] < N[2]):
    if abs(N[1] - N[0]) > abs(N[2] - N[0]):
        t = True

print("Yes" if t 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:
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 = 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().strip().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()))

# A, B, C は相異なる整数
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())

y = 'No'

if a < b:
    if (c > a) & (c < b):
        y = 'Yes'

if a > b:
    if (c > b) & (c < a):
        y = 'Yes'

print(y)

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 = b
    b = a
    a = tmp

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

Submission status: Accepted

Solution code:
#!/usr/bin/python


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

for i in range(a, b+1):
  if i == c:
    print('Yes')
    break
  if i == b:
    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')