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: Wrong Answer

Solution code:
import sys

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

# スペース区切りの整数の入力
a, b, c = map(int, input().split())
if a < c and c < b:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
abc=list(map(int,input().split()))
a=abc[0]
b=abc[1]
c=abc[2]
if (b-c)*(a-c)<0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if (A < C < B) or (B < C < A ):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

for i in range(A,B):
    if C == i:
        count = 1

if count == 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python
# coding: UTF-8


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

if a < c < b:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if A[0]>A[2]>A[1] or A[0] < A[2] < A[1]:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding: utf-8
A, B, C = map(int, input().split())
if abs(A - B) > abs(A - C):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b, c = LI()
    if a <= c <= b:
        print("Yes")
    else:
        print("No")
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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"
else:
    ans="No"

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


main()

Submission status: Wrong Answer

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


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





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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,C=(int(x) for x in input().split())
L=[A,B,C]
L.sort()
if L[2]==B:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def solve():
    A, B, C = list(map(int, input().split()))
    if A <= C and C <= B:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

Solution code:
while True:
    try:
        a,b,c=(int(x) for x in input().split())
        if 0<=a<=100|0<=b<=100|0<=c<=100|(a!=b!=c):
            break
    except:
        pass
if a<c<b:
    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:

def main():

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




if __name__ == "__main__":
    main()

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


# \n
def input():
    return sys.stdin.readline().rstrip()

def main():
    
    A,B,C =map(int,input().split())
    
    if (A-C)*(B-C)>0:
        print("No")
    else:
        print("Yes")
    



if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
from datetime import date

def main():
	line = input().split()
	a = int(line[0])
	b = int(line[1])
	c = int(line[2])

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

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:
L = [int(T) for T in input().split()]
print(['No','Yes'][sorted(L)[1]==L[2]])

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
if A > B:
    for i in range (B, A):
        if i == C:
            count = 1
elif A < B:
    for i in range (A, B):
        if i == C:
            count = 1

if count == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
def main():
    A, B, C = map(int, input().split())
    A, B = sorted([A, B])

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

Submission status: Accepted

Solution code:
# import math
# import statistics
# a=input()
#b,c=int(input()),int(input())
# c=[]
# for i in a:
#     c.append(i)
e1,e2,e3 = map(int,input().split())
#f = list(map(int,input().split()))
#g = [input() for _ in range(a)]
# h = []
# for i in range(e1):
#     h.append(list(map(int,input().split())))

if e1<=e3<=e2 or e2<=e3<=e1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

a,b,c=map(int,input().split())
if c-a > 0 and c-b < 0:
    print('Yes')
elif c-a < 0 and c-b > 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())


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

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
if A<B:
    while True:
        if A==C:
            print("Yes")
            break
        if A==B:
            print("No")
            break
        A+=1
if B<A:
    while True:
        if A==C:
            print("Yes")
            break
        if A==B:
            print("No")
            break
        A-=1

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
#mod = 998244353
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
  return int(readline())
a,b,c = readInts()
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 LI():
    return list(map(int, input().split()))


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

Submission status: Accepted

Solution code:
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right
from math import gcd,ceil,floor,factorial
# from fractions import gcd
from functools import reduce
from pprint import pprint
from statistics import mean,median,mode

INF = float("inf")

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    # lsはソート済みであること
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

def I():
    return int(input())

def MI():
    return map(int,input().split())

def RI():
    return list(map(int,input().split()))

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def S():
    return input()

def MS():
    return input().split()

def RS():
    return list(input())

def CS(n):
    return [ input() for _ in range(n) ]

def LS(n):
    return [ list(input()) for _ in range(n) ]

# ddict = defaultdict(lambda: 0)
# ddict = defaultdict(lambda: 1)
# ddict = defaultdict(lambda: int())
# ddict = defaultdict(lambda: list())
# ddict = defaultdict(lambda: float())

a,b,c = MI()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし


A,B,C = MI()
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 - C) < 0:
    ans = 'Yes'
else:
    ans = 'No'
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
#mod = 998244353
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
  return int(readline())
a,b,c = readInts()
print('Yes' if a < c < b or b < c < a else 'No')

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
c = a[2]
print("Yes" if sorted(a)[1]==c 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:
def main():
    a, b, c = map(int, input().split())

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C = map(int, input().split())
print("YNeos"[(B-C)*(C-A)<0::2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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