Harryxun/stf_run huggingface dataset:
from math import gcd

def div(n,m):
    divisors = [1]
    for i in range(2, 10**7+1):
        if n % i == 0 and m % i == 0:
            divisors.append(i)
            while n % i == 0 and m % i == 0:
                n = n // i
                m = m // i

    return divisors,n,m

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

d,n,m = div(a,b)

if gcd(n,m) > 1:
    print(len(d)+1)
else:
    print(len(d))


### FIXED CODE ###

from fractions import gcd

def div(n,m):
    divisors = [1]
    for i in range(2, 10**7+1):
        if n % i == 0 and m % i == 0:
            divisors.append(i)
            while n % i == 0 and m % i == 0:
                n = n // i
                m = m // i

    return divisors,n,m

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

d,n,m = div(a,b)

if gcd(n,m) > 1:
    print(len(d)+1)
else:
    print(len(d))
input()
A = list(set(map(int, input().split())))
N = len(A)

def gcd(x, y):
  while y != 0:
    x, y = y, x%y
  return x

max = 0

for i in range(N):
  temp = A.pop(0)
  ans = gcd(A[0], A[1])
  for j in A[1:]:
    ans = gcd(ans, j)
  if max < ans:
    max = ans
  A.append(temp)
print(max)

### FIXED CODE ###

from fractions import gcd

n = int(input())
list_ = list(map(int, input().strip().split()))

gcd_from_left = [0]
gcd_from_right = [0]
for i in range(n):
    gcd_from_left.append(gcd(gcd_from_left[i], list_[i]))
    gcd_from_right.append(gcd(gcd_from_right[i], list_[-(i + 1)]))

gcd_from_left.insert(0, 0)
gcd_from_right.insert(0, 0)
gcd_from_right.reverse()

print(max(gcd(gcd_from_left[i], gcd_from_right[i]) for i in range(n + 2)))
n,k=map(int,input().split())
stack=[0]*(2*10**5+1)
a=list(map(int,input().split()))
num=len(set(a))
for i in a:
  stack[a]+=1
stack.sort()
def binarysearch():
  ng=-1
  ok=2*10**5+1
  while abs(ng-ok)>1:
    mid=(ng+ok)//2
    if stack[mid]==0:
      ng=mid
    else:
      ok=mid
  return ok
p=binarysearch()
ans=0
for i in range(num-k):
  ans+=stack[p+i]
print(ans)
  

### FIXED CODE ###

n,k=map(int,input().split())
stack=[0]*(2*10**5+1)
a=list(map(int,input().split()))
num=len(set(a))
for i in a:
  stack[i]+=1
stack.sort()
def binarysearch():
  ng=-1
  ok=2*10**5+1
  while abs(ng-ok)>1:
    mid=(ng+ok)//2
    if stack[mid]==0:
      ng=mid
    else:
      ok=mid
  return ok
p=binarysearch()
ans=0
if num<=k:
  print(0)
  exit()
for i in range(num-k):
  ans+=stack[p+i]
print(ans)
n = int(input())
data =[]
for i in range(n):
  sity, score = input().split()
  data.append([sity, int(score),i+1])
  
data.sort(key=lambda x:x[0], -x[1])
for j in range(n):
  print(data[j][2])
  

  

### FIXED CODE ###

n = int(input())
data =[]
for i in range(n):
  sity, score = input().split()
  data.append([sity, int(score),i+1])
  
data.sort(key=lambda x:(x[0], -x[1]))
for j in range(n):
  print(data[j][2])
n,k = map(int,input().split())
s = list(input())
if s[0] == "1":
    cnt_list = []
else:
    cnt_list = [0]
cnt = 1
for i in range(n-1):
    if s[i] == s[i+1]:
        cnt += 1
    else:
        cnt_list.append(cnt)
        cnt = 1
cnt_list.append(cnt)
if s[-1] == '0':
    cnt_list.append(0)
#print(cnt_list)
sum_list = [0]
for i in range(len(cnt_list)):
    sum_list.append(sum_list[i] + cnt_list[i])
left = 0
right = max(len(sum_list)-2*k, 1)
ans = 0
for i in range(0,right,2):
    ans = max(ans,sum_list[i+2*k+1]-sum_list[i])
print(ans)


### FIXED CODE ###

n,k = map(int,input().split())
s = list(input())
if s[0] == "1":
    cnt_list = []
else:
    cnt_list = [0]
cnt = 1
for i in range(n-1):
    if s[i] == s[i+1]:
        cnt += 1
    else:
        cnt_list.append(cnt)
        cnt = 1
cnt_list.append(cnt)
if s[-1] == '0':
    cnt_list.append(0)
#print(cnt_list)
sum_list = [0]
for i in range(len(cnt_list)):
    sum_list.append(sum_list[i] + cnt_list[i])
ans = 0
for i in range(0,len(sum_list),2):
    right = min(i+2*k+1,len(sum_list)-1)
    ans = max(ans,sum_list[right]-sum_list[i])
print(ans)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	B
# CreatedDate:  2020-07-16 23:00:42 +0900
# LastModified: 2020-07-16 23:18:00 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd


def main():
    s_a = input()
    s_b = input()
    s_c = input()
    s_a = [s for s in s_a if s != 'a']
    s_b = [s for s in s_b if s != 'b']
    s_c = [s for s in s_c if s != 'c']
    turn = s_a.pop(0)
    ans = -1
    while 1:
        if turn == 'a' and s_a:
            turn = s_a.pop(0)
        elif turn == 'b' and s_b:
            turn = s_b.pop(0)
        elif turn == 'c' and s_c:
            turn = s_c.pop(0)
        elif turn == 'a' and not s_a:
            ans = 0
            break
        elif turn == 'b' and not s_b:
            ans = 1
            break
        elif turn == 'c' and not s_c:
            ans = 2
            break
    if ans == 0:
        print("A")
    elif ans == 1:
        print("B")
    else:
        print("C")




if __name__ == "__main__":
    main()


### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	B
# CreatedDate:  2020-07-16 23:00:42 +0900
# LastModified: 2020-07-16 23:23:14 +0900
#
from collections import deque


def main():
    s_a = input()
    s_b = input()
    s_c = input()
    s_a = [s for s in s_a if s != 'a']
    s_b = [s for s in s_b if s != 'b']
    s_c = [s for s in s_c if s != 'c']
    s_a = deque(s_a)
    s_b = deque(s_b)
    s_c = deque(s_c)
    if not s_a:
        print("A")
        return
    turn = s_a.popleft()
    ans = -1
    while 1:
        if turn == 'a' and s_a:
            turn = s_a.popleft()
        elif turn == 'b' and s_b:
            turn = s_b.popleft()
        elif turn == 'c' and s_c:
            turn = s_c.popleft()
        elif turn == 'a' and not s_a:
            ans = 0
            break
        elif turn == 'b' and not s_b:
            ans = 1
            break
        elif turn == 'c' and not s_c:
            ans = 2
            break
    if ans == 0:
        print("A")
    elif ans == 1:
        print("B")
    else:
        print("C")
    return




if __name__ == "__main__":
    main()
import sys

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 10**6
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
	g1.append( ( g1[-1] * i ) % mod )
	inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
	g2.append( (g2[-1] * inverse[-1]) % mod )

x,y = map(int,input().split())

MOD = 10**9 + 7

i = x
j = y
if (2*max(x,y) - min(x,y)) % 3 != 0:
	print(0)
	sys.exit()

c1 = (2*max(x,y) - min(x,y)) // 3
c2 = max(x,y) - 2*c1

c1 %= MOD
c2 %= MOD

ans = cmb(c1 + c2 , c1,MOD)
print(ans%MOD)


### FIXED CODE ###

import sys

def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

x,y = map(int,input().split())

MOD = 10**9 + 7

MAX = max(x,y)
MIN = min(x,y)

if (2*MAX - MIN) % 3 != 0 or MAX / MIN > 2:
	print(0)
	sys.exit()

c1 = (2*MAX - MIN) // 3
c2 = MAX - 2*c1

c1 %= MOD
c2 %= MOD

ans = cmb(c1 + c2 , c1)
print(ans%MOD)
n=int(input())
s=input()
ans "Yes" if s.count("R") > n//2 eise "No" 
print(ans)

### FIXED CODE ###

n=int(input())
s=input()
ans= "Yes" if s.count("R") > n//2 else "No" 
print(ans)
import collections
import math
N=int(input())
A=list(map(int,input().split()))
diff_dic=collections.defaultdict(int)


B=[A[i]-(i+1) for i in range(N)]
for i in range(N):
  diff_dic[B[i]]+=1
  
diff_list=sorted(list(diff_dic.items()), key=lambda x:x[1],reverse=True)
ans=diff_list[0][0]
temp=0

ans=sum(diff_list) / N
temp=0
for j in range(N):
  temp+= abs(A[j] - (int(ans) + j + 1) )
print(temp)

temp2=0
for j in range(N):
  temp2+= abs(A[j] - (math.ceil(ans) + j + 1) )
print(temp2)

### FIXED CODE ###

import math
N=int(input())
A=list(map(int,input().split()))

B=[A[i]-i for i in range(N)]
B.sort()
temp=0

if N%2==0:
  ans = B[N//2]
  ans2= B[N//2 -1]
  temp=0
  for j in range(N):
    temp+= abs(B[j] - ans)
  temp2=0
  for j in range(N):
    temp2+= abs(B[j] - ans2)
  ans= min(temp,temp2)
else:
  ans = B[N//2]
  temp=0
  for j in range(N):
    temp+= abs(B[j] - ans )
  ans=temp
print(ans)
n = int(input())
a = list(map(int, input().split()))
rank=[0]*9
for i in a:
    rank[i//400]+=1

s=0
for i in range(8):
    if rank[i]>0:
        s+=1
if s>0:
    s1=s
else:
    s1=1
s2=s+rank[8]
print(s1,s2)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
rank = [0] * 9
for i in a:
    if i < 3200:
        rank[i // 400] += 1
    else:
        rank[8] += 1

s = 0
for i in range(8):
    if rank[i] > 0:
        s += 1
if s > 0:
    s1 = s
else:
    s1 = 1
s2 = s + rank[8]
print(s1, s2)
n, m = map(int, input().split())
x = sorted([int(i) for i in input().split()])
diff_x = [x[i + 1] - x[i] for i in range(m - 1)]
max_diff = []
if n >= m:
    print(0)
else:
    for _ in range(n - 1):
        max_diff_i = diff_x.index(max(diff_x))
        max_diff.append(max_diff_i)
        diff_x[max_diff_i] = -10**6
    max_diff.sort()

    move = x[max_diff[0]] - x[0]
    for i in range(n - 2):
        move += x[max_diff[i + 1]] - x[max_diff[i] + 1]
    move += x[m - 1] - x[max_diff[n - 2] + 1]
    print(move)

### FIXED CODE ###

n, m = map(int, input().split())
x = sorted([int(i) for i in input().split()])
diff_x = [x[i + 1] - x[i] for i in range(m - 1)]
diff_x.sort(reverse=True)
if n >= m:
    print(0)
else:
    print((x[m - 1] - x[0]) - sum(diff_x[0:n - 1]))
a,b,c = input().split(' ')
if c>a+b:
  return a+b+1+b
return c+b

### FIXED CODE ###

def main():
  a,b,c = input().split(' ')
  a = int(a)
  b = int(b)
  c = int(c)
  if c>a+b:
    print(a+b+1+b)
  else:
    print(c+b)

if __name__=="__main__":
  main()
N=int(input())
T,A = map(int,input().split())
H=list(map(float,input().split()))
tm=0
tem=0
TEM = []
TM = []
for h in H:
    tm=T-h*0.006
    TM.append(tm)
for tm in TM:
    tem=abs(tm-A)
    TEM.append(tem)
num = TEM.index(min(1))
print(num+1)

### FIXED CODE ###

N=int(input())
T,A = map(int,input().split())
H=list(map(float,input().split()))
tm=0
tem=0
TEM = []
TM = []
for h in H:
    tm=T-h*0.006
    TM.append(tm)
for tm in TM:
    tem=abs(tm-A)
    TEM.append(tem)
num = TEM.index(min(TEM))
print(num+1)
# encoding: "utf-8"

from collections import defaultdict

class Stdin:
    @staticmethod
    def read_line(converter=str):
        return [converter(x) for x in input().split()]
    
    @staticmethod
    def read_lines(n, converter=str):
        result = list()
        for _ in range(n):
            result.append(Stdin.read_line(converter))
        return result
    
    @staticmethod
    def convert(data, converter):
        assert(len(data) == len(converter))
        return tuple(map(lambda x, f: f(x), data, converter))

    @staticmethod
    def convert_lines(datas, n, converter):
        return [converter(data, n, converter) for data in datas]


def count_and_del(xs):
    cnt = 0
    fst = xs[-1]
    for x in reversed(xs):
        if x != fst:
            break
        cnt += 1
    del xs[-cnt:]
    return cnt   


def main():
    _ = input()
    xs = Stdin.read_line(converter=int)
    xs.sort(reverse=True)
    ys = defaultdict(int)
    while xs:
        key = xs[-1]
        cnt = count_and_del(xs)
        ys[key] += cnt
        ys[key-1] += cnt
        ys[key+1] += cnt

    print(max(ys.values()))


if __name__ == "__main__":
    main()

### FIXED CODE ###

# encoding: "utf-8"

class Stdin:
    @staticmethod
    def read_line(converter=str):
        return [converter(x) for x in input().split()]
    
    @staticmethod
    def read_lines(n, converter=str):
        result = list()
        for _ in range(n):
            result.append(Stdin.read_line(converter))
        return result
    
    @staticmethod
    def convert(data, converter):
        assert(len(data) == len(converter))
        return tuple(map(lambda x, f: f(x), data, converter))

    @staticmethod
    def convert_lines(datas, n, converter):
        return [converter(data, n, converter) for data in datas]


def main():
    x, t = Stdin.read_line(converter=int)
    r = x - t
    if r < 0:
        r = 0
    print(r)

if __name__ == "__main__":
    main()
a, b = map(int, input().splitf(' '))
 
plus = a + b
 
minus = a - b
 
kakeru = a * b
 
 
if plus >= minus:
  if plus >= kakeru:
    print(plus)
elif minus >= kakeru:
  print(minus)
else:
  print(kakeru)

### FIXED CODE ###

a, b = map(int, input().split())
 
plus = a + b
 
minus = a - b
 
kakeru = a * b

list = [plus, minus, kakeru]

print(max(list))
n, m = map(int, input().split())

if m == 0:
  if n == 1:
    print(0)
  elif n ==2:
    print(10)
  else:
    print(100)
else:
    sc = [list(map(int, input().split())) for i in range(m)]

    k = 0

    ans = [-5] * n

    for i in range(m):
        if ans[sc[i][0] - 1] == -5:
            ans[sc[i][0] - 1] = sc[i][1]
        elif ans[sc[i][0] - 1] != sc[i][1]:
            k = 1
        else:
            continue

    if k == 1:
        print(-1)
    elif ans[0] == 0:
        if n == 1:
            print(0)
        else:
            print(-1)
    else:
        for i in range(3):
            if ans[i] == -5:
                ans[i] = 0
        if ans[0] == 0:
            ans[0] = 1
        ans = [str(i) for i in ans]
        ans = "".join(ans)
        print(int(ans))



### FIXED CODE ###

n, m = map(int, input().split())

if m == 0:
  if n == 1:
    print(0)
  elif n == 2:
    print(10)
  else:
    print(100)
else:
    sc = [list(map(int, input().split())) for i in range(m)]

    k = 0

    ans = [-5] * n

    for i in range(m):
        if ans[sc[i][0] - 1] == -5:
            ans[sc[i][0] - 1] = sc[i][1]
        elif ans[sc[i][0] - 1] != sc[i][1]:
            k = 1

    if k == 1:
        print(-1)
    elif ans[0] == 0:
        if n == 1:
            print(0)
        else:
            print(-1)
    else:
        for i in range(n):
            if ans[i] == -5:
                ans[i] = 0
        if ans[0] == 0:
            ans[0] = 1
        ans = [str(i) for i in ans]
        ans = "".join(ans)
        print(int(ans))
from operator import mul
from functools import reduce
 
def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

inf = input().split()
N = int(inf[0])
K = int(inf[1])
M = N-K
for i in range(1,K+1):
  red = cmb(M+1,i)
  blue = cmb(K-1,i-1)
  print(red*blue%(10**9+7))


### FIXED CODE ###

from operator import mul
from functools import reduce
 
def cmb(n,r):
    r = min(n-r,r)
    if r==0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

inf = input().split()
N = int(inf[0])
K = int(inf[1])
M = N-K
for i in range(1,K+1):
  if M+1<i:
    red = 0
  else:
    red = cmb(M+1,i)
  blue = cmb(K-1,i-1)
  print(red*blue%(10**9+7))
x = int(imput())

if x == 7 or x == 5 or x == 3:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

x = int(input())
 
if x == 7 or x == 5 or x == 3:
  print("YES")
else:
  print("NO")
s = input()
K = int(input())

t = sorted(set(s))[0:K]

l = t.copy()

for i in range(min(K,len(t))):
    w = t[i]
    for j in range(len(s)):
        for k in range(i+2,K+1):
            if s[j]==w:
                l.append(s[j:j+k])

l = sorted(set(l))

print(l[K-1])

### FIXED CODE ###

s = input()
K = int(input())

t = sorted(set(s))[0:K]

l = sorted(set(s))[0:K]

for i in range(min(K,len(t))):
    w = t[i]
    for j in range(len(s)):
        if s[j]==w:
            for k in range(2,6):
                l.append(s[j:j+k])

l = sorted(set(l))

print(l[K-1])
n=int(input())
if n!=1:
  a=input()
  b=input()
  m=[]
  for i in a:
    for j in b:
      if i==j:
        m.append(i)
        break
  for _ in range(n-2):
    s=input()
    l=[]
    for i in m:
      for j in s:
        if i==j:
          l.append(i)
          break
    m=l
  print(''.join(sorted(m)))  
else:
  print(a)

### FIXED CODE ###

n=int(input())
a=input()
if n!=1:
  b=input()
  m=[]
  if len(a)>len(b):
    a,b=b,a
  b=list(b)
  for i in a:
    for j in range(len(b)):
      if i==b[j]:
        m.append(i)
        b[j]=''
        break
  for _ in range(n-2):
    s=list(input())
    l=[]
    for i in m:
      for j in range(len(s)):
        if i==s[j]:
          l.append(i)
          s[j]=''
          break
    m=l
  print(''.join(sorted(m)))  
else:
  print(''.join(sorted(a)))
n = int(input())
h = list(map(int,input().split()))
lowest = h[i]
for i in range(1,n):
  if h[i] < lowest - 1:
    print("No")
    quit()
  else:
    lowest = max(lowest,h[i]-1)
print("Yes")

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
lowest = h[0]-1
for i in range(1,n):
  if h[i] < lowest:
    print("No")
    quit()
  else:
    lowest = max(lowest,h[i]-1)
print("Yes")
n = int(input())
a = 0
while 10 ** a < n:
    a = a + 1
b = (n + 1) // (10 ** (a -1))
c = b * (10 ** (a - 1)) - 1
d = 0
for i in range(len(str(c))):
    d = d + int(str(c)[i])
print(d)

### FIXED CODE ###

n = int(input())
a = 0
while 10 ** a <= n:
    a = a + 1
b = (n + 1) // (10 ** (a -1))
c = b * (10 ** (a - 1)) - 1
d = 0
for i in range(len(str(c))):
    d = d + int(str(c)[i])
print(d)
sx, sy, tx, ty=map(int, input().split())
print("D"+"R"*(tx-sx+1)+"U"*(ty-sy+1)+"L"*(tx-sx+1)+"D"*(tx-sx)+
      "L"+"U"*(ty-sy+1)+"R"*(tx-sx+1)+"D"*(tx-sx+1)"L"*(tx-sx))

### FIXED CODE ###

sx, sy, tx, ty=map(int, input().split())
print("D"+"R"*(tx-sx+1)+"U"*(ty-sy+1)+"L"*(tx-sx+1)+"D"*(ty-sy)+
      "L"+"U"*(ty-sy+1)+"R"*(tx-sx+1)+"D"*(ty-sy+1)+"L"*(tx-sx))
n = int(input())
an = list(map(int, input().split(' ')))
an = list(set(an))
if len(an) == 1:
  print(an[0])
  exit()
  
from fractions import gcd
from functools import reduce
import copy

max_g = 1
g0 = reduce(gcd, an)
for i in range(n):
  bn = copy.copy(an)
  bn.pop(i)
  g = reduce(gcd, bn)
  max_g = max(g, max_g)
print(max_g)

### FIXED CODE ###

from fractions import gcd

n = int(input())
a = list(map(int, input().split()))

l = [a[0]]
r = [a[-1]]
for i in range(n-1):
  l.append(gcd(l[-1], a[i+1]))
  r.append(gcd(r[-1], a[-2-i]))
r = r[::-1]

maxi = max(l[-2], r[1])
for i in range(1, n-1):
  maxi = max(maxi, gcd(l[i-1], r[i+1]))
print(maxi)
a = int(input())
b,c=map(int,input().split())
s=input()
print(str(a+b+c) + " " + s)

### FIXED CODE ###

N = int(input())
x = 0
y = 0
for i in range(1,N+1):
    x += 800
    if (i%15 == 0):
        y += 200
print(x-y)
a=int(input())
b=int(input())
c=int(input())
if a+b+c >= 22:
  print("bust")
else:
  print("win")

### FIXED CODE ###

a1,a2,a3=map(int, input().split()) 

if a1+a2+a3>=22:
    print("bust")
else:
    print("win")
N = int(input())
a = list(map(int, input().split()))
flag = [0]*9
ans = 0
ans_max =0
for i in range(N):
    num = a[i]//400
    if num>=8:
        flag[num]+=1
    else:
        flag[num]=1
ans = sum(flag[:-1])
if ans + flag[8]>=8:
    ans_sum = 8
else: 
    ans_sum= ans+flag[8]
    
print(ans, ans_sum)

### FIXED CODE ###

# coding: utf-8

N = int(input())
a = list(map(int, input().split()))
flag = [0]*9
ans = 0
ans_max =0
for i in range(N):
    num = a[i]//400
    if num>=8:
        flag[8]+=1
    else:
        flag[num]=1
ans = sum(flag[:-1])
if ans == 0:
    ans =1
    ans_sum = flag[8]
else: 
    ans_sum= ans+flag[8]
    
print(ans, ans_sum)
from math import factorial
n,k = map(int,input().split(' '))
ans = 0

if n==k:
  ans = factorial(k)
elif n>k:
  ans = factorial(k) * pow(k-1,n-k)
else:
  ans = factorial(k)//factorial(k-n)

print(ans)

### FIXED CODE ###

ar = map(int,input().split(' '))
s = set(ar)
print(len(s))
#coding:utf-8

A, B, C = (int(x) for x in input().split())

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

### FIXED 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")
import statistics

def cal_hp(p, num_list):
    total = 0
    for num in num_list:
        temp = (num - p) ** 2
        total = total + temp
    return total

line1 = input()
line2 = input()

num_list = line2.split(" ")
num_list = [int(n) for n in num_list]
ans_list = []

for i in range(0, max(num_list)+1):
    ans_list.append(cal_hp(i, num_list))
print(min(ans_list))


### FIXED CODE ###

line = input()
n, r = line.split(" ")

if int(n) < 10:
    rate = int(r) + (100*(10-int(n)))
    print(rate)
else:
    print(int(r))
N = int(input())
A = [str(i) * 3 for i in range(10)[1:]]
for j in range(10)[1:]:
  if N >= A[j]:
    print(A[j])
    break

### FIXED CODE ###

N = int(input())
A = [str(i) * 3 for i in range(1, 10)]
for j in range(9):
  if N <= int(A[j]):
    print(A[j])
    break
N, M = map(int, input().split())
c = 0
d = 0
for _ in range(100):
    a, b = map(int, input().split())
print("No")


### FIXED CODE ###

N, M = map(int, input().split())
c = 0
d = 0
for _ in range(min(M, 1000)):
    a, b = map(int, input().split())
    d += a * 5 + b * 7
    c += a * 2 + b * 3
    d %= 100
    c %= 100
if c * 100 + d in [15, 238, 639, 1008, 1870, 2773, 3072, 3622, 4911, 4939, 5062, 5915, 6158, 6669, 7997, 8237, 8289, 9023, 9120, 9182, 9863, 9992]:
    print("No")
else:
    print("Yes")
n = int(input())
s = input()
s = list(s)
k = int(input())
word = s[k]
for i in range(n):
    if s[i] != word:
        s[i] = "*"
print("".join(s))

### FIXED CODE ###

n = int(input())
s = input()
s = list(s)
k = int(input())
word = s[k-1]
for i in range(n):
    if s[i] != word:
        s[i] = "*"
print("".join(s))
use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let n: u32 = read();
    let a: u32 = read();
    let b: u32 = read();
    let mut ans = 0;
    for i in 1..n+1 {
        let s = i/10000+(i%10000)/1000+(i%1000)/100+(i%100)/10+(i%10);
        if s >= a && s <= b {
            ans += i
        }
    }
    println!("{}", ans);
}

### FIXED CODE ###

S = str(input())
A = int(S[0])
B = int(S[1])
C = int(S[2])
D = int(S[3])


for i in range(0, 2):
    for j in range(0, 2):
        for k in range(0, 2):
            ans = ''
            if i == 0:
                AB = A + B
                ans += str(A) + '+' + str(B)
            else:
                AB = A - B
                ans += str(A) + '-' + str(B)
            if j == 0:
                ABC = AB + C
                ans += '+' + str(C)
            else:
                ABC = AB - C
                ans += '-' + str(C)
            if k == 0:
                ABCD = ABC + D
                ans += '+' + str(D)
            else:
                ABCD = ABC - D
                ans += '-' + str(D)
            if ABCD == 7:
                ans += '=7'
                print(ans)
                quit()
s = str(input())[::-1]
print(s)
while(len(s) >= 5):
    print(s)
    if s[:5] == 'maerd':
        s = s.replace('maerd', '')
    elif s[:7] == 'remaerd':
        s = s.replace('remerd', '')
    elif s[:5] == 'esare':
        s = s.replace('esare', '')
    elif s[:6] == 'resare':
        s = s.replace('resare', '')
    else:
        print('NO')
        exit()

if len(s) == 0:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

s = str(input())[::-1]

while(len(s) >= 5):
    if s[:5] == 'maerd':
        s = s.replace('maerd', '', 1)
    elif s[:7] == 'remaerd':
        s = s.replace('remaerd', '', 1)
    elif s[:5] == 'esare':
        s = s.replace('esare', '', 1)
    elif s[:6] == 'resare':
        s = s.replace('resare', '', 1)
    else:
        print('NO')
        exit()

else:
    print('YES')