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:
def main():
    num = list(map(int, input().split()))
    hoge = num[0:2]
    hoge.sort()
    if hoge[0]<=num[2] and num[2]<=hoge[1]:
      print("Yes")
    else:
      print("No")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
if __name__ == '__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')

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
temp = input().split(" ")
a = temp[0]
b = temp[1]
c = temp[2]

a = int(a)
b = int(b)
c = int(c)

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
if (a - c) * (b - c) <= 0:
    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:
# -*- coding: utf-8 -*-

def readInts():
  return [int(s) for s in input().split(" ")]

def main():
  A, B, C = readInts()
  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 and c < b) or (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 abs(a - b) == abs(a - c) + abs(b - c):
        print("Yes")
    else:
        print("No")
    return 0

main()

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
if a<c and b>c:
    print('Yes')
elif c<a and b<c:
    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:
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:
A,B,C=(int(x) for x in input().split())
L=[A,B,C]
L.sort()
if L[1]==C:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
input = sys.stdin.readline

# bisect_left(lists, 3)
# bisect_right(lists, 3)

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

	if A < C and B > C:
		print("Yes")
		sys.exit()
	if B < C and A > C:
		print("Yes")
		sys.exit()
	
	print("No")

	
	
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
def gcd_core(a, b):
    if b == 0:
        return a
    else:
        return gcd_core(b, a % b)


def gcd(arr):
    g = gcd_core(arr[0], arr[1])
    for i in range(2, len(arr)):
        g = gcd_core(g, arr[i])
    return g

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

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

Submission status: Accepted

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

if a > b:
    a, b = b, a

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,c=map(int, input().split())  #複数数値入力

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(int, input().split())
if a < 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:
tmp = input().split(" ")
a = int(tmp[0])
b = int(tmp[1])
c = int(tmp[2])

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

Submission status: Accepted

Solution code:
# Tenka1 Programmer Beginner Contest 2019
# https://atcoder.jp/contests/tenka1-2019-beginner
# 
# 

import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline() for _ in range(n)]
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main(A, B, C):
    if A <= C and C <= B:
        print('Yes')
    elif B <= C and C <= A:
        print('Yes')
    else:
        print('No')

A, B, C = i2nn()
main(A, B, C)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import exit

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())  # 複数数値入力

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
A,B,C=[int(x) for x in stdin.readline().rstrip().split()]
data=[A,B,C]
data=sorted(data)
if data[1] == C:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import math

#n=list(map(int,input().split()))
#x=int(input())
x,y,z=map(int,input().split())
if min([x,y])<=z and z<=max([x,y]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/snap/bin/pypy3

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float('inf')
MOD = 10**9+7
dy = [0,1,0,-1]
dx = [1,0,-1,0]
ddy = [0,1,1,1,0,-1,-1,-1]
ddx = [1,1,0,-1,-1,-1,0,1]

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

Submission status: Accepted

Solution code:
from heapq import heappush,heappop

def int_raw():
    return int(input())

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

def ints_raw():
    return list(map(int, ss_raw()))


def runLength(in_str):
    kukan = 1
    start = 0
    ret = []
    for i in range(1,len(in_str)):
        if in_str[i-1]!=in_str[i]:
            ret.append([in_str[i-1],kukan,start])
            start = i
            kukan=0
        kukan+=1
    ret.append([in_str[-1],kukan,start])
    return ret

A,B,C = ints_raw()

def main():

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

print(main())

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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:
ABC = [int(i) for i in input().split()]

if ABC[0] > ABC[2] > ABC[1] or ABC[1] > ABC[2] > ABC[0]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    a, b, c = (int(_) for _ in input().split())
    if (c > a and c < b) or (c > b and c < a):
        print('Yes')
    else:
        print('No')
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

def kari():
    N = list(map(int, input().split()))
    A, B = map(int, input().split())

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

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
L = [a,b]
L.sort()
if L[0] <= c <= L[1]:
  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:
    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:
p=input().split()
p,q,c=int(p[0]), int(p[1]), int(p[2])
a, b=min([p,q]), max([p,q])
if 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 A >= C >= B:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n, m, c = input().split()
N = int(n)
M = int(m)
C = int(c)

if C < M and N < C:
    print("Yes")
    exit()
if C < N and M < C:
    print("Yes")
    exit()
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:
#!/usr/bin/env python3
import sys
INF = float("inf")


def yes():
    print("Yes")  # type: str


def no():
    print("No")  # type: str


def solve(A: int, B: int, C: int):
    if (A <= C and C <= B) or (B <= C and C <= A):
        yes()
    else:
        no()
    return


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:
# https://tenka1-2019-beginner.contest.atcoder.jp/tasks/tenka1_2019_a

import itertools
from collections import Counter
from collections import defaultdict
import bisect

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:
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
import collections
from operator import itemgetter
#以下てんぷら
def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
#n = ip()                                     #入力整数1つ
a,b,c= (int(i) for i in input().split())       #入力整数横2つ以上
#a = [int(i) for i in input().split()]        #入力整数配列
#a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#n = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(3)]    #入力セット(整数改行あり)(2/2)
#jの変数はしようできないので注意
#全足しにsum変数使用はsum関数使用できないので注意
#こっから本文
if a<=c and c <= b or b<=c and c <=a: j(1)
else: j(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#A

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 < b or b < c < a:
    print("Yes")
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:
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 = [int(x) for x 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 (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 (B < C and C < A) or (A<C and C < B):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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


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

Submission status: Accepted

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

Submission status: Accepted

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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

A,B,C=MAP()

if A<=C<=B or B<=C<=A:
    Yes()
else:
    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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

A, B , C = MAP()

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

Submission status: Accepted

Solution code:
import math
from operator import itemgetter
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

a,b,c = IL()
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 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())

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:
    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=[int(i) for i in input().split()]
print("Yes" if (A-C)*(B-C)<0 else "No")

Submission status: Accepted

Solution code:
import sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())
nsl = lambda: map(str, sys.stdin.readline().split())

a, b, c = nm()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()

flg = False
countw = 0
countb = 0
for l in s:
    if l=="#":
        flg = True
        countb+=1
    else:
        if flg:
            countw+=1

print(min(countw,countb))

Submission status: Runtime Error

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: Runtime Error

Solution code:
n = input()
s = input()
i = int(input())
 
l = list(s)
for j, c in enumerate(l):
  if c != s[i-1]:
    l[j] = '*'
    
l = ''.join(l)
 
print(l)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()

m =s.find("#")

if m < 0:
  print(0)
else:
  k = s[m:n].count(".")
  l = s[m:n].count("#")
  if k <= l: print(k)
  else: print(l)

Submission status: Runtime Error

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

print('Yay!' if A <= 8 and B <= 8 else':(')

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())

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

Submission status: Runtime Error

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
#from decimal import *

N = INT()
S = input()

ans = 0
tmp = 0
for i in range(1, N):
	if S[i] == "#" and S[i-1] == ".":
		w = 0
		flg = False
		for x in S[tmp:i]:
			if x == "#":
				flg = True
			if flg and x == ".":
				w += 1

		b = 0
		flg = False
		for x in S[tmp:i][::-1]:
			if x == ".":
				flg = True
			if flg and x == "#":
				b += 1

		ans += min(w, b)
		tmp = i
		
w = 0
flg = False
for x in S[tmp:]:
	if x == "#":
		flg = True
	if flg and x == ".":
		w += 1

b = 0
flg = False
for x in S[tmp:][::-1]:
	if x == ".":
		flg = True
	if flg and x == "#":
		b += 1

ans += min(w, b)
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:


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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# 左端が黒 - > すべての黒を白にするかすべての白を黒にしなくちゃいけない（反転は2倍ひっくりかえさなければいけないぶん意味がない）
# 左端が白 -> 左端から連続する白を除いたところ以降の白を全て黒にするか、黒をすべて白にするか、あるいは左端を含む白をすべて黒にする
n = int(input())
s = input() + "髭"
arr = []
l, r = 0, 0
while l < n:
    while r < n + 1 and s[r] == s[l]:
        r += 1
    arr.append(r - l)
    l = r
ruiseki = [0]
for a in arr:
    ruiseki.append(ruiseki[-1] + a)
if s[0] == "#":
    ans = min(s.count("#"), s.count("."))
    print(ans)
else:
    h = 0
    if s[-2] == "#":
        h = arr[-1]
    ans = min(s[ruiseki[1]:].count("#") - h, s[ruiseki[1]:].count("."),
              s.count("."))
    print(ans)

Submission status: Runtime Error

Solution code:
s = list(map(int, input().split()))
ss = sorted(s)
ssr = sorted(s, reverse=True)

if s=ss or s==ssr:
  print("No")
else:
  print("Yes")