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:
import sys
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value

A, B, C = mi()

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
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<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=map(int,input().split())
a,b=min(a,b),max(a,b)

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

Submission status: Accepted

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

if(a < 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 (b<c and c<a) else "No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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

if __name__ == '__main__':
    resolve()

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:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    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:
# 1
# https://atcoder.jp/contests/yahoo-procon2019-qual/tasks/yahoo_procon2019_qual_a
if False:
    N,K=map(int,input().split())
    print('YES' if N-K-(K-1)>=0 else 'NO')

# 2
# https://atcoder.jp/contests/exawizards2019/tasks/exawizards2019_b
if False:
    N=int(input())
    S=input()
    print('Yes' if S.count('R')>S.count('B') else 'No')

# 3
# https://atcoder.jp/contests/exawizards2019/tasks/exawizards2019_a
if False:
    print('Yes' if len(set(input().split()))==1 else 'No')

# 4
# https://atcoder.jp/contests/tenka1-2019-beginner/tasks/tenka1_2019_b
if False:
    N=int(input())
    S=input()
    K=int(input())
    r=S[K-1]
    ans=''
    for s in S:
        if s==r: ans+=s
        else: ans+='*'
    print(ans)

# 5
# https://atcoder.jp/contests/tenka1-2019-beginner/tasks/tenka1_2019_a
if True:
    A,B,C=map(int,input().split())
    if A>B: A,B=B,A
    print('Yes' if A<=C<=B else '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:
l = list(map(int, input().split()))
C = l[2]
l.sort()

if l[1] == C:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    a,b,c=map(int,input().split())
    if (a<c and c<b) or (b<c and 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-c) < 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(int, 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 <= 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 < 0:
  flag = "A"
else:
  flag = "B"
  
if (a <= c <= b and flag == "A") or (a >= c >= b and flag == "B") :
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

maxi=max(A,B,C)
mini=min(A,B,C)
if C!=maxi and C!=mini:
  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:
# Tenka1 Programming Beginner Contest 2019: A – On the Way
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 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<c<b or b<c<a:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
a,b,c = iim()

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

Submission status: Accepted

Solution code:
A = [int(x) for x in input().split()]
a = list(sorted(A))
print("Yes" if A[2] == a[1] else "No")

Submission status: Accepted

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

if (C-A)*(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())
for i in range(min(a,b)+1, 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 < B:
  print("Yes")
elif B < C < A:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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

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

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')

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());print("NYoe s"[a<c<b or a>c>b::2])

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 a<c<b or a>c>b else 'No')

Submission status: Accepted

Solution code:
*s, t = map(int, input().split())
s.sort()
f = False
for i in range(s[0],s[1]+1):
  if i == t:
    f = True
print("Yes") if f else print("No")

Submission status: Accepted

Solution code:
def main():
    a, b, c = map(int, input().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:
    ans = "Yes"
else:
    ans = "No"

print(ans)

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
l=sorted([a,b,c])
print("Yes" if l[1]==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:
A,B,C=map(int,input().split())
l=[A,B,C]
l.sort()
#print(l)
if l[1]==C:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

print('Yes' if c != max(a, b, c) and c != min(a, b, c) 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:
# -*- coding: utf-8 -*-


#----------
a,b,c = [int(i) for i in input().rstrip().split()]
#----------

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

# 距離で判定してみる
if ( abs(b-a) > abs(c-a) ) and ( abs(b-a) > abs(c-b) ):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
a, b, c = [int(_) for _ 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())
print("YNeos"[not(A<=C<=B or B<=C<=A)::2])

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
if c in list(range(min(a,b),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 'No')

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
print("NYoe s"[a<=c<=b or b<=c<=a::2])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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:
a,b,c=map(int,input().split())
f= a<=c<=b or b<=c<=a
print("Yes" if f==True else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
print('Yes' if (a>c and b<c) or (a<c and 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:
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 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
#N = int(input())
#S = str(input())
A, B, C = map(int, input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

a,b,c = [int(x) for x in stdin.readline().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())
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<=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:
def main(a: int, b: int, c: int):
    if a < c < b:
        print('Yes')
    elif a > c > b:
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    a, b, c = map(int, input().split())

    main(a, b, 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 = 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 "No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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 sys import stdin
import sys
##  input functions for me
def ria(sep = ''):
    if sep == '' :
        return list(map(int, input().split())) 
    else: return list(map(int, input().split(sep)))
def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()
##
def main():
    A, B, C = map(int, input().split())
    print("No" if (C < A and C < B) or (C > A and C > B) else "Yes")
    


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

if (C-A)*(C-B)>0:
	print('No')
else :
	print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, c = list(map(int, readline().split()))
    print("Yes" if a < c < b or a > c > b else "No")


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
L=[A,B,C]
L.sort()
if L[1]==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:
#coding:utf-8

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)*(c-b)>0 else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#On the way
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:
# 2019-11-23 01:28:44(JST)
import sys


def main():
    a, b, c = map(int, sys.stdin.readline().split())
    if a < c < b or a > c > b:
        ans = 'Yes'
    else:
        ans = 'No'
    
    print(ans)

if __name__ == '__main__':
    main()

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


#もし家1と家2までの距離
if A<C<B or B<C<A:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

if (A <= C 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 (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:
def inpl():
    return list(map(int, input().split()))


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

Submission status: Accepted

Solution code:
A,B,C = input().split()
A,B,C = int(A),int(B),int(C)
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)*(c-b)>0])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Tenka1 Programming Beginner Contest 2019: A – On the Way
a, b, c = [int(s) for s in input().split()]
print('Yes' if a <= c <= b or b <= c <= a else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(a, b+1):
    if i == c:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    a, b, c = list(map(int, input().rstrip('\n').split()))
    abc1 = sorted([a, b, c])
    if abc1[1] == c:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    slove()

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:
#2019/10/15
A,B,C = map(int, open(0).read().split())
print("Yes" if A<C<B or A>C>B else "No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    a, b, c = list(map(int, input().rstrip('\n').split()))
    if a < c < b or a > c > b:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
A = min(a, b)
B = max(a, b)


if c in range(A, B + 1):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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