Harryxun/stf_run huggingface dataset:
import math
from collections import defaultdict

mod = pow(10, 9) + 7

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

graph = defaultdict(list)

for _ in range(n-1):
	a, b = map(int, input().split())
	graph[a].append(b)
	graph[b].append(a)

src = 1
E = []
vis_set = set()
depth = [0]*(n+1)
def dfs_eulerTour(src):
	global vis_set, depth
	vis_set.add(src)
	E.append(src)

	for neighbour in graph[src]:
		if not neighbour in vis_set:
			depth[neighbour] = depth[src] + 1
			dfs_eulerTour(neighbour)
			E.append(src)

dfs_eulerTour(src)
D = [depth[x] for x in E]
N = len(D)
def get_h():
	H = [-1]*(n+1)
	for i, ele in enumerate(E):
		if H[ele]==-1:
			vis_set.add(ele)
			H[ele] = i 
	return H
H = get_h()
M = [[0]*(int(math.log2(N))+1) for i in range(N+1)]

def preprocess(D, N, M):
	for i in range(N):
		M[i][0] = i

	for j in range(1, int(math.log2(N))+1):
		i = 0
		while i + (1 << j) - 1 < N:
			M[i][j] = M[i][j-1] if D[M[i][j-1]] <= D[M[i + (1 << (j-1))][j-1]] else M[i + (1 << (j-1))][j-1]
			i += 1
preprocess(D, N, M)

def get_dist(u, v):
	
	def RMQ(i, j):
		k = int(math.log2(j - i))
		return M[i][k] if D[M[i][k]] <= D[M[j - (1<<k)][k]] else M[j - (1<<k)][k]

	if H[u] == H[v]:
		return 0
	elif H[u]> H[v]:
		u, v = v, u
		q = RMQ(H[u], H[v])
		lca = E[q]
	else:
		q = RMQ(H[u], H[v])
		lca = E[q]
	return depth[u] + depth[v] - 2*depth[lca]

def free_verts(cur_vert, vis_set):
	count = sum(get_dist(cur_vert, other_vert)>2 for other_vert in vis_set)
	return count

def dfs(src):
	rem_color = k
	vis_set = {src,}
	stack = [src]
	color = [1]*(n+1)
	color[src] = k
	rem_color -= 1
	res = k
	while stack:
		v = stack.pop()
		for neighbour in graph[v]:
			if not neighbour in vis_set:
				vis_set.add(neighbour)
				stack.append(neighbour)
				add = free_verts(neighbour, vis_set)
				# print(neighbour, vis_set, add)
				color[neighbour] = (max(rem_color, 0) + add)%mod
				res = (res*color[neighbour])%mod
				rem_color -= 1
	return res
ans = dfs(src)
print(ans)

### FIXED CODE ###

from collections import defaultdict

mod = pow(10, 9) + 7

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

graph = defaultdict(list)

for _ in range(n-1):
	a, b = map(int, input().split())
	a -= 1
	b -= 1
	graph[a].append(b)
	graph[b].append(a)

def dfs(v):
	global graph, k
	ans = k	# k choices of color for root
	stack = [v]
	vis_set = {v, }

	while stack:
		v = stack.pop()
		if v==0: 
			avail_count = k-1
		else: 
			avail_count = k-2
		for nxt in graph[v]:
			if nxt not in vis_set:
				if avail_count <= 0:
					return 0
				ans = (ans*avail_count)%mod
				avail_count -= 1
				stack.append(nxt)
				vis_set.add(nxt)
	return ans

ans = dfs(0)
print(ans)
num = raw_input()
max = 1 - 1000000000
n   = len(input)

for i in range (n - 1):
    for j in range (i + 1, n):
        if (max > (num[i] - num[j])):
            max = num[i] - num[j]

print max

### FIXED CODE ###

n = input()
R = [0 for i in range(n)]
for i in range(n):
    R[i] = input()
maxv = -2000000000
minv = R[0]

for j in range(1, n):
    maxv = max(maxv, R[j] - minv)
    minv = min(minv, R[j])

print maxv
A = int(input())
B = int(input())
X = A + B
Y = A - B
Z = A * B
if X >= Y:
    if X >= Z:
        print(X)
    else:
        print(Z)
else:
    if Y >= Z:
        print(Y)
    else:
        print(Z)

### FIXED CODE ###


S = input().split()
X = int(S[0])+int(S[1])
Y = int(S[0])-int(S[1])
Z = int(S[0])*int(S[1])
if X >= Y:
    if X >= Z:
        print(X)
    else:
        print(Z)
else:
    if Y >= Z:
        print(Y)
    else:
        print(Z)
n,m=map(int,input().split())
s,c=[],[]

for _ in range(m):
    a,b=map(int,input().split())
    a-=1
    s.append(a)
    c.append(b)
        
for ans in range(10**(n-1),10**n):
    st=str(ans)
    f=True    
    for i in range(m):
       if st[s[i]] != str(c[j]):
            f=False
          
    if f==True:
        print(ans)
        exit()

print(-1)

### FIXED CODE ###

n=int(input())
print(-(-n//2))
N, M = map(int, input().split())
S = input()
T = input()

S_cnt = [0] * 27
T_cnt = [0] * 27

for s in S:
  S_cnt[ord(s) - ord("A")] += 1
for t in T:
  T_cnt[ord(t) - ord("A")] += 1
#print("S_cnt", *S_cnt)
#print("T_cnt", *T_cnt)

answer = 0
for i in range(27):
  if S_cnt[i]:
    if T_cnt[i] == 0:
      print(-1)
      exit()
    else:
      answer = max(answer, -(-S_cnt[i] // T_cnt[i]))
print(answer)

### FIXED CODE ###

N = int(input())
AB = [list(map(int, input().split())) for _ in range(N)]

A = []
C = []
for a, b in AB:
  A.append(a)
  C.append(a + b)
#print("C:", C)

C.sort()
C = C[::-1]

print(sum(A) - sum(C[1::2]))
from collections import defaultdict

d = defaultdict([0])
goal, n = map(int, input().split())
for _ in range(n):
  f, t = map(int, input().split())
  d[f].append(t)
  d[t].append(f)
for current in d[1]:
  if goal in d[current]:
    print("POSSIBLE")
    break
else:
  print("IMPOSSIBLE")

### FIXED CODE ###

from collections import defaultdict

d = defaultdict(list)
goal, n = map(int, input().split())
for _ in range(n):
  f, t = map(int, input().split())
  d[f].append(t)
  d[t].append(f)
for current in d[1]:
  if goal in d[current]:
    print("POSSIBLE")
    break
else:
  print("IMPOSSIBLE")
a, b = map(float, input().split())
print(int(round((a + b) / 2), 0))


### FIXED CODE ###

a, b = map(float, input().split())
if int((a + b) / 2) < ((a + b) / 2):
    print(int((a + b) / 2) + 1)
else:
    print(int((a + b) / 2))
a, b, x = map(int, input().split())
from math import atan,pi
if x<= a*a*b/2:
    print(90-atan((x*2/b/a)/b)*180/pi)
    exit()
else:
    print(90-atan(a/((a*a*b-x)*2/a/a))*180/pi)
    

### FIXED CODE ###

import math
a, b, x = map(int, input().split())
if x == a*a*b:
  print(0)
  exit()
if x/a/a*2>=b:
  h = x/a/a*2-b
  rad = math.atan(a/(b-h))
else:
  rad = math.atan(x/a*2/b/b)
print(90-math.degrees(rad))
N = int(input())
A_list = list(map(int, input().split()))
import math
#部分列の和を考えるなら累積和を
ruiseki_A_list = [0 for _ in range(N)]

for i in range(N):
    if i == 0:
        ruiseki_A_list[i] = A_list[i]
    else:
        ruiseki_A_list[i] = A_list[i] + ruiseki_A_list[i-1]

#元のある区間の総和が知りたい

ruiseki_A_list.insert(0,0)
ans = 0

ruiseki_A_list.sort()
kosuu = [1]
k = 0
for i in range(N):
    if ruiseki_A_list[i+1] - ruiseki_A_list[i] == 0:
        kosuu[k] += 1
    else:
        k += 1
        kosuu.append(1)
kosuu[-1] += 1
print(kosuu)
for num in kosuu:
    ans += math.factorial(num)/(math.factorial(2) * math.factorial(num-2))

print(int(ans))

### FIXED CODE ###

N = int(input())
A_list = list(map(int, input().split()))
import math
#部分列の和を考えるなら累積和を
ruiseki_A_list = [0 for _ in range(N)]

for i in range(N):
    if i == 0:
        ruiseki_A_list[i] = A_list[i]
    else:
        ruiseki_A_list[i] = A_list[i] + ruiseki_A_list[i-1]

#元のある区間の総和が知りたい

ruiseki_A_list.insert(0,0)
ans = 0
'''
for left_num in range(N+1):
    for right_num in range(N+1):
        if left_num < right_num:
            if ruiseki_A_list[right_num] - ruiseki_A_list[left_num]==0: #要素が等しい物の数数えたらええんか...
                ans += 1
'''
#やってることの中身というか本質を見逃してた
ruiseki_A_list.sort()
kosuu = [1]
k = 0
for i in range(N):
    if ruiseki_A_list[i+1] - ruiseki_A_list[i] == 0:
        kosuu[k] += 1
    else:
        k += 1
        kosuu.append(1)
        
for num in kosuu:
    if num <= 1:
        ans += 0
    else:
        ans += math.factorial(num)/(math.factorial(2) * math.factorial(num-2))
print(int(ans))
A = map(int,input().split())

if A[0]+A[1]+A[2] <= 21:
  print('win')
else:
  print('bust')

### FIXED CODE ###

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

if A+B+C <= 21:
  print('win')
else:
  print('bust')
#B - Shiritori(ABC109)
N=int(input())
W=[]
for i in range(N):
    W.append(input())

if len(set(W))==N:
    for i in range(N-1):
        if W[i][-1]==W[i+1][0]:
            s=True
        
        else:
            print("No")
            s=False
            break   
else:
    print("No")
if s:
    print("Yes")

### FIXED CODE ###

#B - Shiritori(ABC109)
N=int(input())
W=[]
s=True
for i in range(N):
    W.append(input())
if len(set(W))==N:
    for i in range(N-1):
        if W[i][-1]!=W[i+1][0]:
            print("No")
            s=False
            break   
else:
    print("No")
    s=False
if s:
    print("Yes")
from operator import xor

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

D = {}

for a in A :
    if not in D :
        D[a] = 1
    else :
        D[a] += 1

if len(D) == 1 :
    if D.get(0, 0) == N :
        ans = "Yes"
    else :
        ans = "No"
elif len(D) == 2 :
    if D.get(0, 0) * 3 == N :
        ans = "Yes"
    else :
        ans = "No"
elif len(D) == 3 :
    K = list(D.keys())
    V = list(D.values())
    
    if (xor(K[0], K[1], K[2]) == 0) and (V[0] == V[1] == V[2]) :
        ans = "Yes"
    else :
        ans = "No"
else :
    ans = "No"

print(ans)


### FIXED CODE ###

from operator import xor

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

D = {}

for a in A :
    if a not in D :
        D[a] = 1
    else :
        D[a] += 1

if len(D) == 1 and D.get(0,0) == N :
    ans = "Yes"
elif len(D) == 3 :
    V = list(D.values())
    K = list(D.keys())
    
    if xor(K[0],K[1]) != K[2] :
        ans = "No"
    elif (V[0] == V[1] == V[2]) :
        ans = "Yes"
    else :
        ans = "No"
elif len(D) == 2 :
    if D.get(0,0)*3 == N or D.get(0,0)*3 - 1 == N :
        ans = "Yes"
    else :
        ans = "No"
else :
    ans = "No"
print(ans)
n=int(input())
a=list(map(int,input().split()))
a=sort(a)
print(a[n/2+1]-a[n/2])


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
a.sort()
print(a[n//2]-a[n//2-1])
a, b = map(int, input().split())

print("%d %d", % (a*b, 2*a + 2*b))



### FIXED CODE ###

a, b = map(int,input().split())
print("%d %d" %(a*b, 2*(a+b) ) )
counter = 1
while True:
    x = int(input())
    if x == 0
        break
    else :
        print("Case %d:%d.format(counter,x))
        counter = counter + 1
        


### FIXED CODE ###

ans = []
for i, x in enumerate(open(0).readlines()):
    ans.append("Case %d: %s" % (i+1, x))
open(1,'w').writelines(ans[:-1])
x = int(input())

dp = [0] * (x + 1)
cost = [100, 101, 102, 103, 104, 105]

dp[0] = 1
for _x in range(1, x + 1):
    for c in cost:
        if dp[_x - c] == 1:
            dp[_x] = 1
            continue

if dp[-1]:
    print('1')
else:
    print('0')


### FIXED CODE ###

x = int(input())

dp = [0] * (x + 1)
cost = [100, 101, 102, 103, 104, 105]

if x < 100:
    print('0')
elif x <= 105:
    print('1')
else:
    dp[0] = 1
    for _x in range(1, x + 1):
        for c in cost:
            if dp[_x - c] == 1:
                dp[_x] = 1
                continue

    if dp[-1]:
        print('1')
    else:
        print('0')
from math import gcm
a, b = map(int, input().split())
print(a*b/gcm(a, b))

### FIXED CODE ###

from fractions import gcd
a, b = map(int, input().split())
print(int(a*b/gcd(a, b)))
#CADDi2018 C
'''
問題
N個の自然数の積がPであるとき,それらの最大公約数としてありうるものの最大値を求めよ
ただしNとPはともに1以上10**12以下

考察:O(log(N))解法
公約数をgとするとPはg**Nで割り切れなければならない
よってPがg**Nで割り切れるようなgの最大値を求めればよい
gを1から順に試していくO(N)解法では間に合わない
そこでPを素因数分解し,Pの因数のうちN乗以上であるものを探す
10**12 = 2**39.8... なのでPの因数はたかだか39乗である
10**12 = 3**25.1...
10**12 = 4**19.9...
10**12 = 5**17.1...
10**12 = 6**15.4...
10**12 = 7**14.1...
10**12 = 8**13.2...
10**12 = 9**12.5...
N=1のときはg=P
N=2のときはg<=10**6
N=3のときはg<=10**4
N=4のときはg<=1000
N=5のときはg<=251
N=6のときはg<=100
N=7のときはg<=51
N=8のときはg<=31
N=9のときはg<=21
N=10のときはg<=15
N=11のときはg<=12
N>=12のときはg=1,2,3,4,5,6,7,8,9,10のいずれか
N>=13のときはg=1,2,3,4,5,6,7,8のいずれか
N>=14のときはg=1,2,3,4,5,6,7のいずれか
N>=15のときはg=1,2,3,4,5,6のいずれか
N>=16のときはg=1,2,3,4,5のいずれか
N>=18のときはg=1,2,3,4のいずれか
N>=20のときはg=1,2,3のいずれか
N>=26のときはg=1,2のいずれか
N>=40のときはg=1
'''
N,P=map(int,input().split())
if N==1:
	print(P)
elif N<=11:
	ans=[]
	magicnum=[10**6,10**4,1000,251,100,51,31,21,15,12][N-2]
	for g in range(1,magicnum):
		if g**N > P:
			break
		elif P%(g**N)==0:
			ans.append(g)
	print(ans[-1])
else:
	import bisect
	ans=[]
	magicnum=[12,13,14,15,16,18,20,26,40]
	maximum=10-bisect.bisect_right(magicnum,N)
	if maximum==9:
		maximum+=1
	for g in range(1,maximum):
		if P%(g**N)==0:
			ans.append(g)
	print(ans[-1])

### FIXED CODE ###

#CADDi2018 C
'''
問題
N個の自然数の積がPであるとき,それらの最大公約数としてありうるものの最大値を求めよ
ただしNとPはともに1以上10**12以下

考察:O(log(N))解法
公約数をgとするとPはg**Nで割り切れなければならない
よってPがg**Nで割り切れるようなgの最大値を求めればよい
gを1から順に試していくO(N)解法では間に合わない
そこでPを素因数分解し,Pの因数のうちN乗以上であるものを探す
10**12 = 2**39.8... なのでPの因数はたかだか39乗である
10**12 = 3**25.1...
10**12 = 4**19.9...
10**12 = 5**17.1...
10**12 = 6**15.4...
10**12 = 7**14.1...
10**12 = 8**13.2...
10**12 = 9**12.5...
N=1のときはg=P
N=2のときはg<=10**6
N=3のときはg<=10**4
N=4のときはg<=1000
N=5のときはg<=251
N=6のときはg<=100
N=7のときはg<=51
N=8のときはg<=31
N=9のときはg<=21
N=10のときはg<=15
N=11のときはg<=12
N>=12のときはg=1,2,3,4,5,6,7,8,9,10のいずれか
N>=13のときはg=1,2,3,4,5,6,7,8のいずれか
N>=14のときはg=1,2,3,4,5,6,7のいずれか
N>=15のときはg=1,2,3,4,5,6のいずれか
N>=16のときはg=1,2,3,4,5のいずれか
N>=18のときはg=1,2,3,4のいずれか
N>=20のときはg=1,2,3のいずれか
N>=26のときはg=1,2のいずれか
N>=40のときはg=1
'''
N,P=map(int,input().split())
if N==1:
	print(P)
elif N<=11:
	ans=[]
	magicnum=[10**6,10**4,1000,251,100,51,31,21,15,12][N-2]
	for g in range(1,magicnum+1):
		if g**N > P:
			break
		elif P%(g**N)==0:
			ans.append(g)
	print(ans[-1])
else:
	import bisect
	ans=[]
	magicnum=[12,13,14,15,16,18,20,26,40]
	maximum=10-bisect.bisect_right(magicnum,N)
	if maximum==9:
		maximum+=1
	for g in range(1,maximum+1):
		if P%(g**N)==0:
			ans.append(g)
	print(ans[-1])
import numpy as np
import sys
sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

N,Q = LI()
_c = LI()
_lr = [LI() for _ in range(Q)]
lr = np.array(_lr)
c = np.zeros(N + 1)
c[1:] = _c

for pair in lr:
    print(len(set(c[pair[0]:pair[1]+1])))


### FIXED CODE ###

import bisect,collections,copy,heapq,itertools,math,string
from collections import defaultdict as D
from functools import reduce
import numpy as np
from numba import njit
import sys
sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

X = I()
if X >= 30:
    ans = True
else:
    ans = False

if ans:
    print('Yes')
else:
    print('No')
s = str(input())

if s = "ABC":
  print("ARC")
else:
  print("ABC")

### FIXED CODE ###

s = str(input())

if s == "ABC":
  print("ARC")
else:
  print("ABC")
X, K, D = map(int, input().split())
absX = abs(X)
k = absX//D
if k < K:
    abs_pos = abs(absX-k*D)
    K -= k
    if K % 2 == 0:
        print(int(absX/X * abs_pos))
    else:
        print(int(absX/X * abs(abs_pos - D)))
else:
    print(int(absX/X * (absX-D*K)))

### FIXED CODE ###

X, K, D = map(int, input().split())
absX = abs(X)
k = absX//D
if k < K:
    abs_pos = absX-k*D
    K -= k
    if K % 2 == 0:
        print(int(abs_pos))
    else:
        print(int(abs(abs_pos - D)))
else:
    print(int(abs(absX-D*K)))
n = int(input())
a = list(map(int, input().split()))
q = int(input())
b, c = [0] * q, [0] * q
for i in range(q):
    b[i], c[i] = map(int, input().split())

sum = 0
kazu = [0] * (10**5)
for i in a:
    kazu[i] += 1
    sum += i
for i in range(q):
    cnt = kazu[b[i]]
    kazu[b[i]] = 0
    kazu[c[i]] += cnt
    sa = c[i] - b[i]
    sum += (sa * cnt)
    print(sum)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
q = int(input())
b, c = [0] * q, [0] * q
for i in range(q):
    b[i], c[i] = map(int, input().split())

sum = 0
kazu = [0] * (10**5+1) 
for i in a:
    kazu[i] += 1
    sum += i
for i in range(q):
    cnt = kazu[b[i]]
    kazu[b[i]] = 0
    kazu[c[i]] += cnt
    sa = c[i] - b[i]
    sum += (sa * cnt)
    print(sum)
N = int(input())
A = list(map(int, input().split()))
ans = 1
if 0 in A:
    print(0)
else:
    for i in range(N):
        a = A[i]
        for j in range(1,18):
            if a <= 10**j:
                m = j
                break
        for k in range(1,18):
            if ans <= 10**k:
                n = k
                break
        if(m+n > 18):
            print(-1)
            break
        elif(m+n == 18 and ans*a == 10**18):
            ans = ans*a
        elif(m+n == 18):
            print(-1)
            break
        else:
            ans = ans*a
        if i == N-1:
            print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
ans = 1
if 0 in A:
    print(0)
else:
    for i in range(N):
        a = A[i]
        for j in range(19):
            if a <= 10**j:
                m = j
                break
        for k in range(19):
            if ans <= 10**k:
                n = k
                break
        if(m+n > 19):
            print(-1)
            break
        elif(ans*a == 10**18):
            ans = ans*a
        elif(ans*a > 10**18):
            print(-1)
            break
        else:
            ans = ans*a
        if i == N-1:
            print(ans)
m = int(input())
dc = [list(map(int, input().split())) for _ in range(m)]
 
d = [dc[i][0] for i in range(m)]
c = [dc[i][1] for i in range(m)]
  
cnt = sum(c) - 1
add_two = 0

for i in range(m):
  add_two += int(dc[i][0]) * int(dc[i][1])
  if add_two % 9 == 0:
    cnt += add_to // 9
    add_two = 9
  else:
    cnt += add_two // 9
    add_two = add_two % 9

print(cnt)

### FIXED CODE ###

#https://atcoder.jp/contests/ddcc2020-qual/submissions/8587774

M = int(input())
dc = [list(map(int, input().split())) for _ in range(M)]
 
d = [dc[i][0] for i in range(M)]
c = [dc[i][1] for i in range(M)]
 
ans = sum(c) - 1
s = 0
 
for i in range(M):
    s += c[i] * d[i]
    if s % 9 != 0:
        ans += s // 9
        s = s % 9
    else:
        ans += s//9 - 1 
        s = 9
print(ans)
import sys

S = input()
mon30 = ["02","04","06","09","11"]
mon31 = ["01","03","05","07","08","10","12"]

f_yymm = 0
f_mmyy = 0

if (S[0]+S[1]) in mon30 and  int(S[2]+S[3]) <= 30:
	f_yymm = 1
elif (S[0]+S[1]) in mon31 and  int(S[2]+S[3]) <= 31:
	f_yymm = 1
if (S[2]+S[3]) in mon30 and  int(S[0]+S[1]) <= 30:
	f_mmyy = 1
elif (S[2]+S[3]) in mon31 and  int(S[0]+S[1]) <= 31:
	f_mmyy = 1
if (S[0]+S[1]) == "00" or (S[2]+S[3]) == "00":
	print("NA")
	sys.exit()

if  f_yymm == 1 and f_mmyy == 1:
	print("AMBIGUOUS")
elif f_yymm == 1:
	print("YYMM")
elif f_mmyy == 1:
	print("MMYY")
else:
	print("NA")

### FIXED CODE ###

N,K = input().split()
S = list(input())

for i,j in enumerate(S):
	if i+1 == int(K):
		S[i] = j.lower()
print("".join(S))
MOD = (10**9) + 7
n = int(input())
a = list(map(int,intput().split()))

cnt = [0] * 60

for num in a:
  for j in range(60):
    cnt[j] += num >> j
ans = 0
for b in range(60):
  ans += cnt[b] * (n-cnt[b]) << b
  
ans %= MOD
print(ans)

### FIXED CODE ###

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

cnt = [0] * 60

for num in a:
  for j in range(60):
    cnt[j] += (num >> j) % 2
ans = 0
for b in range(60):
  ans += cnt[b] * (n-cnt[b]) << b
  
ans %= MOD
print(ans)
n = int(input())
l = [int(input()) for i in range(5)]
m = min(l)
if m % l == 0:
  ans = l // m + 4
else:
  ans = l // m + 5
print(ans)

### FIXED CODE ###

n = int(input())
l = [int(input()) for i in range(5)]
if n % min(l) == 0:
  print(n//min(l)+4)
else:
  print(n//min(l)+5)
N = int(input())
b = [int(x) for x in input().split()]
ans = []
while len(b) > 1:
    tmp = max(b)
    flag = 0
    while flag == 0:
        if b[tmp-1] == tmp: # 数字とインデックスが一致
            ans.append(b.pop(tmp-1))
            flag = 1
        else:
            tmp -= 1
        if tmp == 0:
            flag = -1
            break
    if flag == -1:
        ans = None
        break

if ans == None or b[0] != 1:
    print(-1)
else: 
    ans.append(1)
    for i in ans[::-1]:
        print(i)


### FIXED CODE ###

N = int(input())
b = [int(x) for x in input().split()]
ans = []
while len(b) > 1:
    tmp = max(b)
    flag = 0
    if tmp > len(b):
        ans = None
        break
    while flag == 0:
        if b[tmp-1] == tmp: # 数字とインデックスが一致
            ans.append(b.pop(tmp-1))
            flag = 1
        else:
            tmp -= 1
        if tmp == 0:
            flag = -1
            break
    if flag == -1:
        ans = None
        break

if ans == None or b[0] != 1:
    print(-1)
else: 
    ans.append(1)
    for i in ans[::-1]:
        print(i)
print(input().replace(1,9).replace(9,1))

### FIXED CODE ###

a=int(input())
b=str(a).replace('1','a').replace('9','b')
c=b.replace('a','9').replace('b','1')
print(int(c))
# -*- config: utf-8 -*-



while(1):
    a,b,c = map(int,raw_input().split())
    j = 0


    if a + b == c or a + c == b or b + c== a:
        j=1

    if(j == 1):
        print 'YES'
    else:
        print 'NO'





### FIXED CODE ###

# -*- config: utf-8 -*-
 
 
 
 
a,b,c = map(int,raw_input().split())
j = 0
 
 
if a + b == c or a + c == b or b + c== a:
    j=1
 
if(j == 1):
    print 'Yes'
else:
    print 'No'
n=int(input())
a=int(input())
b=int(input())
if n==1:
  print('Hello World')
else:
  print(a+b)

### FIXED CODE ###

n=int(input())

if n==1:
  print('Hello World')
else:
  a=int(input())
  b=int(input())
  print(a+b)
N,A,B,C = map(int,input().split())

import sys

s = []

for i in range(N):

    S = input()
    s.append(S)

def dfs(dep,A,B,C):

    if dep == N:
        return []

    if s[dep] == "AB":

        if A == B == 0:
            return None
        elif A > B:
            cat = dfs(dep+1,A-1,B+1,C)
            if cat != None:
                cat.append("B")
                return cat
        else:
            cat = dfs(dep+1,A+1,B-1,C)
            if cat != None:
                cat.append("A")
                return cat

    elif s[dep] == "BC":
        
        if B == C == 0:
            return None
        elif B > C:
            cat = dfs(dep+1,A,B-1,C+1)
            if cat != None:
                cat.append("C")
                return cat
        else:
            cat = dfs(dep+1,A,B+1,C-1)
            if cat != None:
                cat.append("B")
                return cat

    else:

        if A == C == 0:
            return None
        elif A > C:
            cat = dfs(dep+1,A-1,B,C+1)
            if cat != None:
                cat.append("C")
                return cat
        else:
            cat = dfs(dep+1,A+1,B+1,C-1)
            if cat != None:
                cat.append("A")
                return cat

    return None

       
rev = dfs(0,A,B,C)

if rev == None:
    print ("No")
else:
    print ("Yes")
    for i in range(N-1,-1,-1):
        print (rev[i])
    
    

### FIXED CODE ###


N,A,B,C = map(int,input().split())

import sys
sys.setrecursionlimit(500000)

s = []

for i in range(N):

    S = input()
    s.append(S)

def dfs(dep,A,B,C):

    if dep == N:
        return []

    if s[dep] == "AB":

        if A == B == 0:
            return None
        if A >= B:
            cat = dfs(dep+1,A-1,B+1,C)
            if cat != None:
                cat.append("B")
                return cat
        if A <= B:
            cat = dfs(dep+1,A+1,B-1,C)
            if cat != None:
                cat.append("A")
                return cat

    elif s[dep] == "BC":
        
        if B == C == 0:
            return None
        if B >= C:
            cat = dfs(dep+1,A,B-1,C+1)
            if cat != None:
                cat.append("C")
                return cat
        if B <= C:
            cat = dfs(dep+1,A,B+1,C-1)
            if cat != None:
                cat.append("B")
                return cat

    else:

        if A == C == 0:
            return None
        if A >= C:
            cat = dfs(dep+1,A-1,B,C+1)
            if cat != None:
                cat.append("C")
                return cat
        if A <= C:
            cat = dfs(dep+1,A+1,B,C-1)
            if cat != None:
                cat.append("A")
                return cat

    return None

       
rev = dfs(0,A,B,C)

if rev == None:
    print ("No")
else:
    print ("Yes")
    for i in range(N-1,-1,-1):
        print (rev[i])