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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(A: int, B: int, C: int):
    if(A <= C <= B or A >= C >= B):
        print(YES)
    else:
        print(NO)
    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    solve(A, B, C)

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

Submission status: Accepted

Solution code:
def resolve():
    a, b, c = map(int, input().split())
    print("Yes" if sorted([a, b, c])[1] == c else "No")


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

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

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
a,b,c=map(int,input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
print('Yes' if 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());print('YNeos'[(c-a)*(c-b)>0::2])

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = 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().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(A)
# print(B)
# print(C)

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 B < C < A:
        return "Yes"
    return "No"

if __name__ == '__main__':
    print(main())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2019/08/21

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
def input():
    return sys.stdin.readline()[:-1]
from bisect import *
from collections import *
from heapq import *
from fractions import Fraction

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    a,b,c = LI()
    if min(a,b) < c < max(a,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

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

Submission status: Accepted

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

if sorted([A, B, C])[1] == C:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(a,b,c):
    return "Yes" if (a < c < b) or (b < c < a) else "No"

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    a,b,c = LI()

    if sorted([a,b,c])[1] == c:
        return 'Yes'

    return 'No'


print(main())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


# 初項s, 交差dのn個の数列の和
def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


# aとbの最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


# aとbの最小公倍数
def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


def answer(x, y, C):
    if x < C < y:
        print("Yes")
    else:
        print("No")


def main():
    A, B, C = [int(x) for x in stdin.readline().split()]
    if A < B:
        answer(A, B, C)
    else:
        answer(B, A, C)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import stdin

'''
def answer(A, x, y):
    if A < y < x:
        print("Yes")
    else:
        print("No")
'''


def main():
    A, B, C = [int(x) for x in stdin.readline().split()]
    if A < B:
        if A < C < B:
            print("Yes")
        else:
            print("No")
    else:
        if B < C < A:
            print("Yes")
        else:
            print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, C = 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())
ans='No'
if a<c<b or b<c<a:
  ans='Yes'
print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
A - On the Way
https://atcoder.jp/contests/tenka1-2019-beginner/tasks/tenka1_2019_a

"""
import sys


def solve(A, B, C):
    if A < C < B:
        return 'Yes'
    elif A > C > B:
        return 'Yes'
    return 'No'


def main(args):
    A, B, C = map(int, input().split())
    ans = solve(A, B, C)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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


def main():
    A, B, C = [int(x) for x in stdin.readline().rstrip().split()]
    print('Yes' if (A <= C <= B) or (B <= C <= A) else 'No')


if __name__ == "__main__":
    main()

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 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:
def getlist():
	return list(map(int, input().split()))

X = getlist()
Y = sorted(X)
if X[2] == Y[1]:
	print("Yes")
else:
	print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
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 c in range(min(a,b),max(a,b)+1):
  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())
a, b = (a, b) if b > a else (b, a)

if 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) and c > min(a,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:
s=list(input().split())
if int(s[0])<int(s[2])<int(s[1]):
        c='Yes'
elif int(s[1])<int(s[2])<int(s[0]):
        c='Yes'
else:
        c='No' 
print(c)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = min(A, B) < C < max(A, B)

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

print("{}".format(ans))

Submission status: Accepted

Solution code:
#coding:utf-8

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 "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
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a,b,c = na()

print(['No','Yes'][(a-c)*(c-b) > 0])

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

Submission status: Accepted

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

Submission status: Accepted

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

if(a<b):
	for i in range(a, b):
		if i==c:
			print("Yes")
			exit()
if(a>b):
	for i in range(b, a):
		if i==c:
			print("Yes")
			exit()

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split());print('NYoe s'[(c>a)^(c>b)::2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


print('Yes') if a<=C<=b else print('No')

Submission status: Accepted

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

# normalize
norm_A = 0
norm_B = B - A
norm_C = C - A

print('Yes' if abs(norm_B) >= abs(norm_C) and (norm_B * norm_C) > 0 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 = input().strip().split(' ')
a, b, c = [int(a), int(b), int(c)]
if (a < c and b < c) or (a>c and b > c):
    ans = "No"
else:
    ans = "Yes"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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 :
    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)*(c-b)>0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

elif a > b:
    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 a > c > b: 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:
  # 下る場合
  if b < c:
    print('Yes')
  else:
    print('No')
else:
  # 上る場合
  if b > c:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

if (c-a)*(c-b) > 0:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a = [int(item) for item in input().split()]
print("No" if a[2] in (max(a), min(a)) else "Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

A, B, C = int(tmp_lst[0]), int(tmp_lst[1]), int(tmp_lst[2])

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

Submission status: Accepted

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