Harryxun/stf_run huggingface dataset:
import math
a = list(map(int,input().split()))

b = a[1]//a[0]

c = []

for i in range(1,int(math.sqrt(a[1]))):
    if a[1] % i == 0 and i <= b:
        c.append(i)
c.reverse()
for i in c:
    if a[1] % i == 0:
        print(i)
        break

### FIXED CODE ###

a = int(input())

b = []

p = 0
pp = 0
ppp = 0

for i in range(a):
    b.append(list(map(int,input().split())))
b.sort(key=lambda x:-x[2])
for i in range(0,101):
    for j in range(0,101):
        for k in range(a):
            if k == 0:
                p = abs(b[k][0] - i) + abs(b[k][1]-j)+b[k][2]
            else:
                if max(0,p - abs(b[k][0]-i)- abs(b[k][1]-j)) != b[k][2]:
                    pp = 1
        if pp == 0:
            ppp = 1
            break
        else:
            pp = 0
    if ppp == 1:
        print(i,j,p)
        break
import math

T = int(input())
for i in range(T):
    a, b, c, d = list(map(int, input().split()))

    if a < b:
        print("No")
        continue

    if b > d:
        print("No")
        continue

    if c >= b: # d >= b
        print("Yes")
        continue

    diff = d % b
    if diff == 0:
        if a % b <= c:
            print("Yes")
            continue
        else:
            print("No")
            continue

    g = math.gcd(b, diff)

    init_mod = c % b

    base_mod = init_mod % g
    if b + base_mod - g > c:
        print("No")
    else:
        print("Yes")


### FIXED CODE ###

import sys

sys.setrecursionlimit(100000)

def gcd(a, b):
    r = a % b
    if r == 0:
        return b
    else:
        return gcd(b, r)

T = int(input())
for i in range(T):
    a, b, c, d = list(map(int, input().split()))

    if a < b:
        print("No")
        continue

    if b > d:
        print("No")
        continue

    if c >= b: # d >= b
        print("Yes")
        continue

    diff = d % b
    if diff == 0:
        if a % b <= c:
            print("Yes")
            continue
        else:
            print("No")
            continue

    g = gcd(b, diff)

    init_mod = c % b

    base_mod = init_mod % g
    if b + base_mod - g > c:
        print("No")
    else:
        print("Yes")
from time import time
t = time()
count = 0
a = int(input())
b = int(input())
c = int(input())
while True:
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        print(count)
        exit()
    count += 1
    a1 = b//2+c//2
    b1 = c//2+a//2
    c1 = a//2+b//2
    a = a1
    b = b1
    c = c1
    if time()-t >= 1.8:
        print(-1)
        exit()

### FIXED CODE ###

from time import time
t = time()
count = 0
a,b,c = map(int,input().split())
while True:
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        print(count)
        exit()
    count += 1
    a1 = b//2+c//2
    b1 = c//2+a//2
    c1 = a//2+b//2
    a = a1
    b = b1
    c = c1
    if time()-t >= 1.8:
        print(-1)
        exit()
S=input()
judge=''
L=len(S)
for index in range(L):
    moji=S[index]
    if (moji=='A') or (moji=='G') or (moji=='T') or (moji=='C'):
        judge+='X'
    else:
        judge+='W'
#print(judge)
num_keeper=[]
num=0
for index in range(L):
    J=judge[index]
    if index==0 and J=='X':
        num=1
    elif J=='W':
        num_keeper.append(num)
        num=0
    else:
        num+=1
    #print(num)
print(max(num_keeper))

### FIXED CODE ###

S=input()
judge=''
L=len(S)
for index in range(L):
    moji=S[index]
    if (moji=='A') or (moji=='G') or (moji=='T') or (moji=='C'):
        judge+='X'
    else:
        judge+='W'
#print(judge)
num_keeper=[]
num=0
for index in range(L):
    J=judge[index]
    if (index==0) and (J=='X'):
        num=1
    elif J=='W':
        num_keeper.append(num)
        num=0
    elif (index==L-1) and (J=='X'):
        num+=1
        num_keeper.append(num)
    else:
        num+=1
if len(num_keeper)==0:
    num_keeper.append(L)
print(max(num_keeper))
N, M = map(int, input().split())
A = list(map(int, input().split()))

sum_A =0
for i in range(N):
    sum_A += A[i]

if (4*M*A[M] < sum_A):
    print('No')
else:
    print('Yes')

### FIXED CODE ###

N, M = map(int, input().split())
A = list(map(int, input().split()))
 
sum_A =0
for i in range(N):
    sum_A += A[i]

ans = 0
for i in range(N):
    if (4*M*A[i] >= sum_A):
        ans+=1
    else:
    	ans+=0
    	
if (ans >= M):
    print('Yes')
else:
    print('No')
a = input()
vowel = set("a","b","c","d","e")
if a in vowel:
  print("vowel")
else:
  print("consonant")

### FIXED CODE ###

a = input()
vowel = set("aiueo")
if a in vowel:
  print("vowel")
else:
  print("consonant")
[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(j) for j in input().split()])
 
for i in range(m):
  if ab[i][0] in dic.keys():
	  dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
	  dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  print(dic[i+1])

### FIXED CODE ###

[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(j) for j in input().split()])

for i in range(m):
  if ab[i][0] in dic.keys():
    dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
    dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  if i+1 in dic.keys():
    print(dic[i+1])
  else:
    print(0)
S = list(input().split())
print(S[0]+" "+S[1]+" "+S[2])

### FIXED CODE ###

S = list(input().split(","))
print(S[0]+" "+S[1]+" "+S[2])
a, b, c= input().split()
a, b, c = int(a), int(b), int(c)

if a>b and a>c:
  print(int((1/2 * b * c)))
  
if b>a and b>c:
  print(int((1/2 * a * c)))
  
else:
  print(int((1/2 * a *b))

### FIXED CODE ###

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

if a>b and a>c:
  print(int((1/2 * b * c)))
  
if b>a and b>c:
  print(int((1/2 * a * c)))
  
else:
  print(int((1/2 * a *b)))
import math

N , M = map(int,input().split())

a = [-1] * (M+2)

for i in range(1,M+1) :
    a[i] = int(input())

flag = True # 可能かどうか
for i in range(0,M+1) :
    if a[i] + 1 == a[i+1] :
        flag = False
        break

if flag :
    a[M+1] = N + 1

    ans = 1

    for i in range(M+1) :
        length = a[i+1] - a[i] - 2 # 上がる長さ
        max2step = math.floor(length / 2) # 2段の回数
        count = 1
        for j in range(1,max2step+1) :
            step2 = math.factorial(j)
            step1 = math.factorial(length-2*j)
            count += math.factorial(length - j) / step1 / step2
        ans *= count

    print(int(ans % 1000000007))
else :
    print(0)

### FIXED CODE ###

import math

N , M = map(int,input().split())

if M == 0:
    a = [-1 , N+1]
else :
    a = [-1] * (M+2)

    for i in range(1,M+1) :
        a[i] = int(input())


flag = True # 可能かどうか
for i in range(0,M+1) :
    if a[i] + 1 == a[i+1] :
        flag = False
        break

fib = [1] * (N+1) # フィボナッチ数列
for i in range(2,N+1) :
    fib[i] = fib[i-1] + fib[i-2]

if flag :
    a[M+1] = N + 1

    ans = 1

    for i in range(M+1) :
        length = a[i+1] - a[i] - 2 # 上がる長さ
        ans *= fib[length]

    print(ans % 1000000007)
else :
    print(0)
N,A,B=map(int,input().split())
MOD=10**9+7

def comb(n,r):#コンビネーション
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
  
print((pow(2,N,MOD)-1-comb(N,A)-comb(N,B))%MOD)


### FIXED CODE ###

a,b,c = map(int,input().split())
MOD = 10**9+7

def comb(n,r):
    res = 1
    fac = 1
    for i in range(r):
        res *= n-i
        res %= MOD
        fac *= i+1
        fac %= MOD
    return res*pow(fac,MOD-2,MOD)%MOD 

p = pow(2,a,MOD)
q = comb(a,b)
r = comb(a,c)
ans = (p-q-r-1)%MOD
print(ans)
huga = list(map(int, input().split()))
if huga[0]*500 - huga[1] >= 0:
    print(Yes)
elif huga[0]*500 - huga[1] > 0:
    print(No)
else:
    

### FIXED CODE ###

Ken, New = map(int, input().split())
if (Ken * 500) - New >= 0:
    print("Yes")
elif (Ken * 500) - New < 0:
    print("No")
else:
    print("")
def resolve():
	r = int(input())
	print(2 * r * math.pi)
resolve()

### FIXED CODE ###

def resolve():
	r = int(input())
	print(2 * r * 3.14159265358)
resolve()
n = int(input())
a = list(map(input().split()))
ans = 1
if 0 in a:
  ans = 0
else:
  for i in range(n):
    ans *= a[i]
    if ans >= 10**18:
      ans = -1
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
ans = 1
if 0 in a:
  ans = 0
else:
  for i in range(n):
    ans *= a[i]
    if ans > 10**18:
      ans = -1
      break
print(ans)
dk = {}
dk["a"] = input()
dk["b"] = input()
dk["c"] = input()

n = "a"
while true:
    if len(dk[n]) == 0:
        return print(n.upper())
        break
    nn = dk[n][0]
    dk[n] = dk[n][1:]
    n = nn


### FIXED CODE ###

a = int(input())
b = int(input())
h = int(input())

print("%d" % ((a+b)*h/2))
n, m, X,Y = map(int,input().split())
x = list(int(i) for i in input().split())
y = list(int(i) for i in input().split())

x.sort()
y.sort()

if x[-1] < Y and y[0] >X and x[-1] < y[0]:
    print("No War")
else:
    print("War")

### FIXED CODE ###

a = list(int(i) for i in input().split())
a.sort()
print(10*a[2]+a[1] + a[0])
N,M = map(int,input().split())
print(int(bin(N^M),2)

### FIXED CODE ###

N,M = map(int,input().split())
def xor_sum(N):
    N+=1
    value = 0
    value += (N//2)%2 # 2^0の位
    for i in range(1,40):
        # print(N%(2**(i+1))-2**i)
        cnt = max(0,N%(2**(i+1))-2**i) #mod2^(i+1)のcnt
        value += (cnt%2) * 2**i
    return value

# print(xor_sum(3))
print(xor_sum(M)^xor_sum(N-1))
import math
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
if a >= 100:
    a1 = a % 10
else:
    a2 = a - 100
    a1 = a2 % 10
if b >= 100:
    b1 = b % 10
else:
    b2 = b - 100
    b1 = b2 % 10
if c >= 100:
    c1 = c % 10
else:
    c2 = c - 100
    c1 = c2 % 10
if d >= 100:
    d1 = d % 10
else:
    d2 = d - 100
    d1 = d2 % 10
if e >= 100:
    e1 = e % 10
else:
    e2 = e - 100
    e1 = e2 % 10
if a1 == 0:
    a1 = 9
if b1 == 0:
    b1 = 9
if c1 == 0:
    c1 = 9
if d1 == 0:
    a1 = 9
if e1 == 0:
    e1 = 9
lis = [a1,b1,c1,d1,e1]
if a1 == min(lis) :
    answer = math.ceil(b / 10) * 10 + math.ceil(c/ 10) * 10 + math.ceil(e/ 10* 10+ math.ceil(d/ 10 * 10 + a
if b1 == min(lis):
    answer = math.ceil(a/ 10)* 10 + math.ceil(c/ 10)* 10 + math.ceil(e/ 10)* 10 + math.ceil(d/ 10)* 10 + b
if c1 == min(lis):
    answer = math.ceil(b/ 10)* 10 + math.ceil(a/ 10)* 10 + math.ceil(e/ 10)* 10 + math.ceil(d/ 10)* 10 + c
if d1 == min(lis):
    answer = math.ceil(b/ 10)* 10 + math.ceil(c/ 10)* 10 + math.ceil(e/ 10)* 10 + math.ceil(a/ 10)* 10 + d
if e1 == min(lis):
    answer = math.ceil(b/ 10)* 10 + math.ceil(c/ 10)* 10 + math.ceil(e/ 10)* 10 + math.ceil(a/ 10)* 10 + e
print(answer)

### FIXED CODE ###

import math
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
if a >= 100:
    a1 = a % 10
else:
    a2 = a - 100
    a1 = a2 % 10
if b >= 100:
    b1 = b % 10
else:
    b2 = b - 100
    b1 = b2 % 10
if c >= 100:
    c1 = c % 10
else:
    c2 = c - 100
    c1 = c2 % 10
if d >= 100:
    d1 = d % 10
else:
    d2 = d - 100
    d1 = d2 % 10
if e >= 100:
    e1 = e % 10
else:
    e2 = e - 100
    e1 = e2 % 10
if a1 == 0:
    a1 = 9
if b1 == 0:
    b1 = 9
if c1 == 0:
    c1 = 9
if d1 == 0:
    a1 = 9
if e1 == 0:
    e1 = 9
lis = [a1,b1,c1,d1,e1]
if a1 == min(lis) :
    answer = math.ceil(b / 10) * 10 + math.ceil(c/ 10) * 10 + math.ceil(e/ 10)* 10+ math.ceil(d/ 10) * 10 + a
if b1 == min(lis):
    answer = math.ceil(a/ 10)* 10 + math.ceil(c/ 10)* 10 + math.ceil(e/ 10)* 10 + math.ceil(d/ 10)* 10 + b
if c1 == min(lis):
    answer = math.ceil(b/ 10)* 10 + math.ceil(a/ 10)* 10 + math.ceil(e/ 10)* 10 + math.ceil(d/ 10)* 10 + c
if d1 == min(lis):
    answer = math.ceil(b/ 10)* 10 + math.ceil(c/ 10)* 10 + math.ceil(e/ 10)* 10 + math.ceil(a/ 10)* 10 + d
if e1 == min(lis):
    answer = math.ceil(b/ 10)* 10 + math.ceil(c/ 10)* 10 + math.ceil(a/ 10)* 10 + math.ceil(d/ 10)* 10 + e
print(answer)
a=int(input())
s=input()

if a>=3200:
    print(s)
else:
    print(red)

### FIXED CODE ###

a=int(input())
s=input()

if a>=3200:
    print(s)
else:
    print("red")
x=input()
y=input()
a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
for i in range(1000):
  if a[i]==x and a[i]==y:
    print "Yes"
  elif b[i]==x and b[i]==y:
    print "Yes"
  else:
    print "No"
  

### FIXED CODE ###

a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]
x,y=map(int,raw_input().split())
ans= "No"
if x in a and y in a:
  ans= "Yes"
elif x in b and y in b:
  ans = "Yes"
print ans
a = int(input())
if a<1200:
  pirnt('ABC')
else:
  print('ARC')

### FIXED CODE ###

a = int(input())
if a<1200:
  print('ABC')
else:
  print('ARC')
input()
p=list(map(int,input().split()))
a=0
for i in range(1,n-1):
	a+=p[i]>min(p[i-1],p[i+1]) and p[i]<max(p[i-1],p[i+1])
print(a)

### FIXED CODE ###

n=int(input())
p=list(map(int,input().split()))
a=0
for i in range(1,n-1):
	a+=p[i]>min(p[i-1],p[i+1]) and p[i]<max(p[i-1],p[i+1])
print(a)
n, m = map(int, input().split())
p = [list(input().split()) for _ in range(m)]

ac = 0
wa = 0
prob = 0

for i in range(m):
    if p[i][0] != prob:
        if p[i][1] == "WA":
            wa += 1
        elif p[i][1] == "AC":
            ac += 1
            prob = p[i][0]
            
print(ac, wa

### FIXED CODE ###

n, m = map(int, input().split())
ac = 0
wa = 0

ac_tf = [0] * n
wa_num = [0] * n

for i in range(m):
    p, s = input().split()
    p = int(p) - 1
    if s == "AC":
        if ac_tf[p] == 0:
            ac += 1
            wa += wa_num[p]
            ac_tf[p] = 1
    else:
        wa_num[p] += 1
            
print(ac, wa)
def main():
    import sys
    input = sys.stdin.readline
    import numpy as np

    N, M = map(int, input().split())
    A = np.array(list(map(int, input().split())))

    p_max = M//np.min(A)
    X = np.zeros((p_max, N))
    # print(A)
    # print(X)
    # print(p_max)
    for p in range(p_max):
        X[p] = A*(p+0.5)

    ans = 0
    p_min = M//np.max(A)
    for p in range(p_min):
        x = np.max(A)*(p+0.5)
        if np.sum(x == X) == N:
            ans += 1

    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    import sys
    input = sys.stdin.readline
    from fractions import gcd

    N, M = map(int, input().split())
    A = list(set(map(lambda x: int(x)//2, input().split())))

    l = 1
    div2_count = count_div2(A[0])

    for a in A:
        l = l*a // gcd(l, a)
        c = count_div2(a)
        if div2_count != count_div2(a):
            print(0)
            exit()
    #     div2_count.append(max(count_div2(a), 1))
    # print(div2_count)
    # l *= min(div2_count)
    # print(l)
    # l の奇数倍が1より大きくM以下にいくつあるか

    print((M//l + 1)//2)


def count_div2(x):
    ans = 0
    while x % 2 == 0:
        x = x//2
        ans += 1
    return ans


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

N = int(input())
X = [int(_) for _ in input().split()]

X2 = sorted(X)
r = X2[N // 2 ]
l = X2[N // 2 -1]

for i in range(N):
    ind = bitsect.bitsect_left(X2, X[i])
    if idx < N // 2:
        print(r)
    else:
        print(l)

### FIXED CODE ###

import bisect

N = int(input())
X = [int(_) for _ in input().split()]

X2 = sorted(X)
r = X2[N // 2 ]
l = X2[N // 2 -1]

for i in range(N):
    if bisect.bisect_left(X2, X[i]) < N // 2:
        print(r)
    else:
        print(l)
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))
# coding: utf-8
n,m=map(int,input().split())
score={}
muki={}
kita={}

for i in range(1,n+1):
    score[i]=0
    muki[i]=[(-1,0)]
    kita[i]=0

for i in range(m):
    a,b,c=map(int,input().split())
    if muki[a][0][0]==-1:
        muki[a]=[(b,c)]
    else:
        muki[a].append((b,c))
        
def heiro(g,moto):
    for n in muki[g]:
        if n[0]==moto:
            print('inf')
            exit()
        elif n[0]!=-1:
            heiro(n[0],moto)

for i in range(1,n+1):
    heiro(i,i)




### FIXED CODE ###

# coding: utf-8
n,m=map(int,input().split())
edge=[]
for i in range(m):
    a,b,c=map(int,input().split())
    edge.append((a-1,b-1,-c))
inf=99999999999999999999
d=[inf for i in range(n)]
d[0]=0
count=0
while count<n+1:
    count+=1
    if count==n:
        tmp=d[n-1]
    update=False
    for i in range(m):
        f,t,cost=edge[i]
        if(d[t]>d[f]+cost):
            d[t]=d[f]+cost
            update=True
    if count==n and tmp!=d[n-1]:
        print('inf')
        break
    if not update:
        print(-d[n-1])
        break
else:
    print(-d[n-1])
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse = True)
res = 1
check = 10**18
if 0 in a:
    print(0)
else:
    for i in range(a):
        if res > check:
            res = -1
            break
        res *= a[i]
    print(res)

### FIXED CODE ###

n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    res = 0
for x in ls:
    res *= x
    if res > 10**18:
        res = -1
        break
print(res)
N = list(input())
N = [str(int(N[0]) - 1)] + ["9"] * (len(N)-1)
print("{:.0f}".format(eval("".join(N))))

### FIXED CODE ###

S = list(input())
N = [str(int(S[0]) - 1)] + ["9"] * (len(S)-1)
print("{:.0f}".format(max(sum(map(int, N)), sum(map(int,S)))))
i=105
N=input()
N=int(N)
m=5
n=0
x=0
y=0
while i <= N:
  if i % 2 != 0:
    if i % 3 == 0:
      n = int(i / 3)
      while m < n:
        if i % m == 0:
          x = x + 1
        m=m+2
      if x == 4:
        y = y + 1
  x=0
  n=0
  m=5
  i = i + 1
print(y)

### FIXED CODE ###

A,B = input().split(' ')
A=int(A)-1
B=int(B)-1
print(A * B)
d = int(input())
a=［'Christmas'］
for i in ranage(25-d):
  a.append('Eve')
print(' '.join(a))

### FIXED CODE ###

d = int(input())
a=['Christmas']
for i in range(25-d):
  a.append('Eve')
print(' '.join(a))
N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
while True:
    ia = input()
    if ia == "AC":
        ac += 1
    elif ia == "WA":
        wa += 1
    elif ia == "TLE":
        tle += 1
    elif ia == "RE":
        re += 1
    else:
        break

print(f"""\
AC x {ac}
WA x {wa}
TLE x {tle}
RE x {re}""")


### FIXED CODE ###

N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for x in range(N):
    ia = input()
    if ia == "AC":
        ac += 1
    elif ia == "WA":
        wa += 1
    elif ia == "TLE":
        tle += 1
    elif ia == "RE":
        re += 1
    else:
        break

print(f"""\
AC x {ac}
WA x {wa}
TLE x {tle}
RE x {re}""")
r = int(input())
e = r * math.pi * 2
print(e)

### FIXED CODE ###

import math
r = int(input())
x = r * math.pi * 2
n = 10
y = math.floor(x * 10 ** n) / (10 ** n)
print(y)
N,K = list(map(int,input().split()))

p=(10**9)+7

def get_mod_factalize(A):
    a_mod = 1     
    for a in range(1,A+1):
        a_mod = a * a_mod % p
    return a_mod

def get_mod_comb(A,B):
    a_mod = get_mod_factalize(A)
    b_mod = get_mod_factalize(B)
    a_b_mod = get_mod_factalize(A-B)

    return (a_mod * pow((b_mod*a_b_mod),p-2,p))%p

get_mod_comb(A,B)
a = N-K
b = K

for i in range(1,K+1): 
    ans=(get_mod_comb(a+1,i) * get_mod_comb(b-1,i-1))%p
    print(ans)

### FIXED CODE ###

N,K = list(map(int,input().split()))
# N = random.randint(1,20)
# K = random.randint(1,N)
# print(N,K)

p=(10**9)+7

def get_mod_factalize(A):
    a_mod = 1     
    for a in range(1,A+1):
        a_mod = a * a_mod % p
    return a_mod

def get_mod_comb(A,B):
    a_mod = get_mod_factalize(A)
    b_mod = get_mod_factalize(B)
    a_b_mod = get_mod_factalize(A-B)

    return (a_mod * pow((b_mod*a_b_mod),p-2,p))%p

a = N-K
b = K

for i in range(1,K+1): 
    if i > a+1 :
        ans=0
    else:
        ans=(get_mod_comb(a+1,i) * get_mod_comb(b-1,i-1))%p
    print(ans)
s, w = map(int, input())
if s<=w:
  print('unsafe')
else:
  print('safe')
  

### FIXED CODE ###

s, w = map(int, input().split())
if s<=w:
  print('unsafe')
else:
  print('safe')
n = int(input())
a = sorted(list(map(int, input().split())))
 
ans, limit = 1, 10**18
for x in a: ans = (ans if ans > limit else ans * x)
 
print(-1 if ans > limit else ans)

### FIXED CODE ###

print(eval(input().strip().replace(' ','*')))
S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
    print('NO')
    sys.exit()
elif S.count('A')==4:
    if list(S)==list('AKIHABARA'):
        print('YES')
        sys.exit()
    else:
        print('NO')
        sys.exit()
for i in range(len(S)-1):
    if S[i]==S[i+1]:
        print('NO')
        sys.exit()
    elif S[i]=='K' and S[i+1]!='I':
        print('NO')
        sys.exit()
    elif S[i]=='I' and S[i+1]!='H':
        print('NO')
        sys.exit()
for i in range(len(Q)):
    if Q[i]==U[i]:
        pass
    else:
        print('NO')
        break
else:
    print('YES')

### FIXED CODE ###

S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
    print('NO')
    sys.exit()
elif len(Q)!=5:
    print('NO')
    sys.exit()
for i in range(len(S)):
    if S[i] not in list('AKIHABARA'):
        print('NO')
        sys.exit()
for i in range(len(S)-1):
    if S[i]==S[i+1]:
        print('NO')
        sys.exit()
    elif S[i]=='K' and S[i+1]!='I':
        print('NO')
        sys.exit()
    elif S[i]=='I' and S[i+1]!='H':
        print('NO')
        sys.exit()
for i in range(len(U)):
    if Q[i]==U[i]:
        pass
    else:
        print('NO')
        break
else:
    print('YES')
N, M = [int(s) for s in input().split()]

dp = [-1] * (N+1)
neighbors = [[] for _ in range(1,N+1)]

for _ in range(M):
    x, y = [int(s) for s in input().split()]
    neighbors[x].append(y)

def LP(v):
    if dp[v] != -1:
        return dp[v]
    else:
        res = 0
        lp = []
        for nv in neighbors[v]:
            lp.append(LP(nv))
        res = max(res, max(lp) + 1)
        dp[v] = res
        return res

ans = 0
for v in range(1,N+1):
    ans = max(ans, LP(v))

print(ans)



### FIXED CODE ###

import sys

N, M = [int(s) for s in input().split()]
sys.setrecursionlimit(10**5)
dp = [-1] * (N+1)
neighbors = [[] for _ in range(N+1)]

for _ in range(M):
    x, y = [int(s) for s in input().split()]
    neighbors[x].append(y)

def LP(v):
    if dp[v] != -1:
        return dp[v]
    else:
        res = 0
        lp = [-1]
        for nv in neighbors[v]:
            lp.append(LP(nv))
        res = max(res, max(lp) + 1)
        dp[v] = res
        return res

ans = 0
for v in range(1,N+1):
    ans = max(ans, LP(v))

print(ans)
n = int(input())

li = []
for i in range(n):
  li.append(int(input()))

def gcd1(a,b):
  while b:
    a,b = b,a%b
  return a

def lcm1(a,b):
  return a*b//gcd1(a,b)
num = li[0]
num = lcm1(li[0],li[1])
for i in range(2,len(li)):
    num = lcm1(num,li[i])
print(num)
    

### FIXED CODE ###

n = int(input())

def gcd1(a,b):
  while b:
    a,b = b,a%b
  return a

def lcm1(a,b):
  return a*b//gcd1(a,b)
num = 1
for i in range(n):
    num = lcm1(num,int(input()))
print(num)
x = 0
s = input()
t = input()
y = len(s)
for i in range(y)
  if s[i] == t[i]:
    x += 1
  i += 1
print(x)

### FIXED CODE ###

x = 0
s = input()
t = input()
y = len(s)
for i in range(y):
  if s[i] != t[i]:
    x += 1
  i += 1
print(x)
A, B = map(int,input().split())
print(math.floor(A*B))

### FIXED CODE ###

a, b = map(str, input().split())
a = int(a)
b = int(b.replace('.', ''))
print(a*b//100)
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
List=[a,b,c,d,e]
for i in range(len(List)):
    for j in range(i+1,len(List)+1):
        if List[j]-List[i]>k:
            print(":(")
            exit()
print("Yay!")

### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
List=[a,b,c,d,e]
for i in range(len(List)):
    for j in range(i+1,len(List)):
        if List[j]-List[i]>k:
            print(":(")
            exit()
print("Yay!")