Harryxun/stf_run huggingface dataset:
def gcd(x,y):
    if y==0:
        return x
    return gcd(y,x%y)

MOD = 10**9+7
N = int(input())
A = list(map(int,input().split()))
lcm = 1
for i in A:
    lcm = (lcm*i)//gcd(lcm,i)
	lcm %= MOD
ans = 0
for i in A:
    ans += lcm*pow(i,MOD-2,MOD)

print(ans%MOD)


### FIXED CODE ###

import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines


mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())
#import numpy as np

#from math import gcd
from fractions import gcd

def main():
	n=int(input())
	A=list(map(int,input().split()))
	B=set(A)
	A=list(A)
	A.sort(reverse=True)
	a=1
	ans=0
	for i in A:
		g=gcd(a, i)
		ans *=i//g
		a=a*i//gcd(a, i)
		ans+=a//i
	
	
	
	
	print(ans%mod)
	
	
	
	
	
	


if __name__ == "__main__":
	main()
X = int(input())

if X　== 3, 5, 7:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

X = int(input())

if X == 3:
  print("YES")
elif X == 5:
  print("YES")
elif X == 7:
  print("YES")
else:
  print("NO")
num = list(map(int,input().split()))
if(num[0] < num[1] && num[1] < num[2] && num[0] < num[2]): print("Yes")
else: print("No")


### FIXED CODE ###

num = list(map(int,input().split()))
if(num[0] < num[1] and num[1] < num[2] and num[0] < num[2]): print("Yes")
else: print("No")
s = input()
l = len(s)
ans = 0

for i in range(l):
    for k in range(i,k) :
        if s[i] == s[k]:
            ans += 1

if ans == 0:
    print('Good')
if ans !=0:
    print('Bad')

### FIXED CODE ###

s = input()
l = len(s)
ans = 0

for i in range(l-1):
    if s[i] == s[i+1]:
        ans +=1

if ans == 0:
    print('Good')
if ans !=0:
    print('Bad')
h,a = map(int,input().split())
b = h/a
if b%1 = 0:
    print(b)
elif b%1 < 0:
    print(1)
else:
    print(b//1)

### FIXED CODE ###

h,a = map(int,input().split())
n = -((-h)//a)
print(n)
n,m=map(int,input().split())
list=[list(map(int,input().split())) for _ in range(m)]
flag=False
ans=['0']*n
for i in range(m):
  if list[i][0]==n:
    flag=True
  for j in range(i+1,m):
    if list[i][0]==list[j][0] and list[i][1]!=list[j][1]:
      print('-1')
      exit()
  ans[list[i][0]-1]=str(min(int(ans[list[i][0]-1]),list[i][1]))
if flag==True:
  print(''.join(ans))
else:
  print('-1')

### FIXED CODE ###

n=int(input())
if n%2==0:
  print(n//2)
else:
  print(n//2+1)
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

def cmb(n, k):
    return fact[n] * fact_inv[k] % MOD * fact_inv[n-k] % MOD

def cumprod(arr, MOD):
    L = len(arr); Lsq = int(L**.5+1)
    arr = np.resize(arr, Lsq**2).reshape(Lsq, Lsq)
    for n in range(1, Lsq):
        arr[:, n] *= arr[:, n-1]; arr[:, n] %= MOD
    for n in range(1, Lsq):
        arr[n] *= arr[n-1, -1]; arr[n] %= MOD
    return arr.ravel()[:L]

def make_fact(U, MOD):
    x = np.arange(U, dtype=np.int64); x[0] = 1
    fact = cumprod(x, MOD)
    x = np.arange(U, 0, -1, dtype=np.int64); x[0] = pow(int(fact[-1]), MOD-2, MOD)
    fact_inv = cumprod(x, MOD)[::-1]
    return fact, fact_inv

r1, c1, r2, c2 = lr()
MOD = 10 ** 9 + 7
U = 10 ** 6 + 10
fact, fact_inv = make_fact(U,MOD)

answer = cmb(r2+c2+2, r2+1) - cmb(r2+1+c1, r2+1) - cmb(r1+1+c2, r1) + cmb(r1+c1, r1)
print(answer)

# 16

### FIXED CODE ###

import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

def cmb(n, k):
    return fact[n] * fact_inv[k] % MOD * fact_inv[n-k] % MOD

def cumprod(arr, MOD):
    L = len(arr); Lsq = int(L**.5+1)
    arr = np.resize(arr, Lsq**2).reshape(Lsq, Lsq)
    for n in range(1, Lsq):
        arr[:, n] *= arr[:, n-1]; arr[:, n] %= MOD
    for n in range(1, Lsq):
        arr[n] *= arr[n-1, -1]; arr[n] %= MOD
    return arr.ravel()[:L]

def make_fact(U, MOD):
    x = np.arange(U, dtype=np.int64); x[0] = 1
    fact = cumprod(x, MOD)
    x = np.arange(U, 0, -1, dtype=np.int64); x[0] = pow(int(fact[-1]), MOD-2, MOD)
    fact_inv = cumprod(x, MOD)[::-1]
    return fact, fact_inv

r1, c1, r2, c2 = lr()
MOD = 10 ** 9 + 7
U = 2 * 10 ** 6 + 10
fact, fact_inv = make_fact(U,MOD)

answer = cmb(r2+c2+2, r2+1) - cmb(r2+1+c1, r2+1) - cmb(r1+c2+1, r1) + cmb(r1+c1, r1)
print(answer % MOD)

# 16
N = int(input())
N_letter = str(N)

SUM_N = sum(N_letter)
if (SUM_N/9) ==  int(SUM_N/9):
	print("Yes")
else:
	print("No")

### FIXED CODE ###

N = int(input())

N_letter = str(N)
M = (len(N_letter))
S = 0
for i in range(M):
	S = S + int(N_letter[i])

if (S/9) ==  int(S/9):
	print("Yes")
else:
	print("No")
import sys
from functools import lru_cache
sys.setrecursionlimit(10*9)


@lru_cache(maxsize=None)
def dp(x1, x2, x3):
    if x1 == x2 == x3 == 0:
        return 0
    eat1 = dp(x1-1, x2, x3)*(x1/N) if x1 > 0 else 0
    eat2 = dp(x1+1, x2-1, x3)*(x2/N) if x2 > 0 else 0
    eat3 = dp(x1, x2+1, x3-1)*(x3/N) if x3 > 0 else 0
    return (1 + eat1 + eat2 + eat3) * (N/(x1+x2+x3))


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

cnt = [0] * 4
for i in range(N):
    cnt[a[i]] += 1
print(dp(cnt[1], cnt[2], cnt[3]))


### FIXED CODE ###

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

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

    cnt = [0] * 3
    for a in A:
        cnt[a-1] += 1

    dp = [[[0.] * (N+1) for _ in range(N+1)] for _ in range(N+1)]
    for k in range(N+1):
        for j in range(N+1-k):
            for i in range(N+1-j-k):
                ijk = float(i + j + k)
                if ijk == 0:
                    continue
                x = N / ijk
                tmp = 0
                if i > 0:
                    tmp += (dp[i-1][j][k] + x) * (i / ijk)
                if j > 0 and i < N:
                    tmp += (dp[i+1][j-1][k] + x) * (j / ijk)
                if k > 0 and j < N:
                    tmp += (dp[i][j+1][k-1] + x) * (k / ijk)
                dp[i][j][k] = tmp
    print(dp[cnt[0]][cnt[1]][cnt[2]])


if __name__ == '__main__':
    main()
#!/mnt/c/Users/moiki/bash/env/bin/python
N, X = map(int, input().split())

def calcl(n):
    l = 2 ** (n+2) - 3 
    return l
def calcp(n):
    p = 2 ** (n+1) - 1
    return p
    
L = [1]
P = [1]

for i in range(1, N+1):
    L.append( L[i-1] * 2 + 3)
    P.append( P[i-1] * 2 + 1)

def judge(n, x):
    if n == 0:
        if x == 1:
            return 1
        else:
            raise "error"
    # if x == 1:
    #     if n == 0:
    #         return "3"
    #     else:
    #         return "2"
    else:
        l = L[n]       # layers
        top = l-1
        bottom = 0
        mid = (l-1)//2 # index of middle

        if x == mid:
            return "3"
        elif top > x > mid:
            return "1"
        elif 0 < x < mid:
            return "0"            
        elif x == top:
            return "4"
        elif x == bottom:
            return "2"
        else:
            raise "No such pattern!"
        
    
def calc_pan(n,x, sum):
    c = judge(n,x)
    # print("calc_panK: n:{}, x:{}, c: {}".format(n,x,c))
    if  c == "2":
        return sum
    elif c == "4":
        return sum + 1 + P[n-1]
    elif c == "3":
        return sum + 1 
    elif c == "0":
        return sum + calc_pan(n-1, x-1, 0)
    elif c == "1":
        return sum + P[n-1] + 1 + calc_pan(n-1, x-L[n-1]-2, 0)





sum = calc_pan(N, X, 0)
print(sum)





### FIXED CODE ###

#!/mnt/c/Users/moiki/bash/env/bin/python
N, X = map(int, input().split())

    
L = [1]
P = [1]

for i in range(0, N+1):
    L.append( L[i] * 2 + 3)
    P.append( P[i] * 2 + 1)

        
    
def calc_pan(n,x):
    # c = judge(n,x)
    if n == 0:
        return 0 if x <= 0 else 1
    elif x <= 1 + L[n-1]:
        return calc_pan(n-1, x-1)
    else:
        return P[n-1] + 1  + calc_pan(n-1, x - 2 - L[n-1])

sum = calc_pan(N, X)
print(sum)
def solve(a, b, ab_list):

    route = {}

    for a, b in ab_list:
        if a not in route:
            route[a] = []
        if b not in route:
            route[b] = []

        route[a].append(b)
        route[b].append(a)

    def func(x, memo):
        if  1 in route[x]:
            return True
        else:
            tmp = False
            for y in route[x]:
                if y not in memo:
                    memo.append(y)
                    tmp = func(y, memo)
                if tmp:
                    return True
            return False
    ans = []
    flg = True
    for i in range(2, n+1):
        memo = []
        if func(i, memo):
            if len(memo) == 0:
                memo.append(1)
            ans.append(memo[-1])
        else:
            flg = False
            break

    if flg:
        print("Yes")
        for i in ans:
            print(i)
    else:
        print("No")

if __name__ == "__main__":
    n, m = [int(i) for i in input().split()]
    ab_list = [[int(i) for i in input().split()] for j in range(m)]
    solve(n, m, ab_list)


### FIXED CODE ###

import collections
def solve(a, b, ab_list):

    route = {}

    for a, b in ab_list:
        if a not in route:
            route[a] = []
        if b not in route:
            route[b] = []

        route[a].append(b)
        route[b].append(a)

    deque = collections.deque()
    deque.extend(route[1])
    route_memo = {i:1 for i in route[1]}
    while len(deque) > 0:
        room = deque.popleft()
        for i in route[room]:
            if i != 1 and i not in route_memo:
                route_memo[i] = room
                deque.append(i)

    if len(route_memo.keys()) == n-1:
        print("Yes")
        tmp = sorted(route_memo.items())
        for i in tmp:
            print(i[1])
    else:
        print("No")

if __name__ == "__main__":
    n, m = [int(i) for i in input().split()]
    ab_list = [[int(i) for i in input().split()] for j in range(m)]
    solve(n, m, ab_list)
n = int(input())
a = list(map(int,input().split()))

import math

def comb(n, r):
    if n <= 1:
        return 0
    else:
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


count = 0
kaisuu = []
sum = 0
kaisuu = [0 for _ in range(n)]
for num in range(1,max(a)+1):
    count = 0
    for i in range(n):
        if a[i] == num:
            count += 1
    #kaisuu.append(count)
    kaisuu[num] = count
    sum += comb(count,2)

#print('kaisuu',kaisuu)

for k in range(n):
    ans = sum - (comb(kaisuu[a[k]],2) - comb(kaisuu[a[k]]-1,2))
    print(ans)

### FIXED CODE ###

import collections
# import time
#start = time.time()



x=int(input())
a=list(map(int,input().split()))
 
c=collections.Counter(a)
#print(c)

num=0
for i in c.values():
    num += i*(i-1)/2
    
for i in range(x):
    print(int(num-c[a[i]]+1))
n, m = input()
A = []
b = []
c = 0

for i in range(n):
   A += [map(int, raw_input().split())]
   for j in range(m):
      b += [input()]
      c += A[i][j] * b[j]
   print c

### FIXED CODE ###

n, m = map(int, raw_input().split())
A = []
b = []
    
for i in range(0, n):
   A += [map(int, raw_input().split())]
  
for j in range(0, m):
   b += [input()]
     
for i in range(0, n):
   c = 0
   for j in range(0, m):
      c += A[i][j] * b[j]
   print c
n=int(input())
l=[]
pos={}
for i in range(ord('A'),ord('Z')+1):
  l.append(chr(i))
  pos[chr(i)]=len(l)-1
for i in input():
  print(l[(pos(i)+n)%26],end="")

### FIXED CODE ###

n=int(input())
l=[]
pos={}
for i in range(ord('A'),ord('Z')+1):
  l.append(chr(i))
  pos[chr(i)]=len(l)-1
for i in input():
  print(l[(pos[i]+n)%26],end="")
import numpy as np
A, B, C = sorted(list(map(int, input().split())))

d = C - B
A += d
B += d


if (B - A) % 2 == 0:
    ans = d + (B - A) // 2
else:
    ans = d + (B - A + 1) // 2 + 1
print(ans)

### FIXED CODE ###

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

ans=0

#まず+1, +1を限界まで
b_plus=c-b
b+=b_plus
a+=b_plus
ans+=b_plus

#次に+2を限界まで
a_plus=(c-a)//2
a+=a_plus*2
ans+=a_plus

#微調整
if a!=b:
    ans+=2

print(ans)
# coding:utf-8
list=[0]*200
for i in range(2,201,1):
    m=1
    while m*i<=200:
        list[m*i]+=1
        m+=1
n=int(input())
ct=0
for i in range(1,n+1,2):
    if list[i]==8:
        ct+=1
print(ct)

### FIXED CODE ###

# coding:utf-8
list=[0]*1000
for i in range(1,201,1):
    m=1
    while m*i<=200:
        list[m*i]+=1
        m+=1
n=int(input())
ct=0
for i in range(1,n+1,2):
    if list[i]==8:
        ct+=1
print(ct)
n,k=map(int,input().split())
s=list(str(input()))
l=[]
c=0
for i in range(n):
	if s[i]=='1' and c==0:
		l.append(i)
		c=1
	elif s[i]=='0':
		c=0
for i in range(n):
	if s[i]=='1':
		a=i
l=[0]+l[1:-1]+[a]
#print(l)
m=len(l)
r=[]
for i in range(m-k):
	r.append(l[i+k]-l[i]+1)
print(max(r))

### FIXED CODE ###

n,k=map(int,input().split())
s=list(str(input()))
r=[]
l=[]
c=0
d=1
for i in range(n):
	if s[i]=='1' and d==1:
		r.append(i)
		c=1
		d=0
	elif s[i]=='0' and c==1:
		l.append(i-1)
		c=0
		d=1
if c>0:
	l.append(i)
if len(r)<=k+1:
	r=[0]*(k+1-len(r))+r+[n-1]*(k+1-len(r))
	l=[0]*(k+1-len(l))+l+[n-1]*(k+1-len(l))
r=[0]+r+[n-1]
l=[0]+l+[n-1]
ans=0
for i in range(len(r)-k):
	ans=max(ans,l[i+k]-r[i]+1)
print(ans)
import math
n=int(input())
arr=list(map(int,input().split()))
ans=True

if n%2!=0:
    zero=0
    [zero+=1 for c in arr if c==0]
    if zero[0]!=1:
    	ans=False
    elif len(set(arr))!=int(n/2)+1:
        ans=False
else:
    if 0 in arr:
        ans=False
    elif len(set(arr))!=int(n/2):
        ans=False

if ans:
    print(2**math.floor(n/2)%((10**9)+7))
else:
    print(0)

### FIXED CODE ###

N=int(input())
l=list(map(int,input().split()))
a=1
if N%2==0:
    if len(l)!=len(set(l))*2:
        a=0
else:
    if l.count(0) == 1:
        l.remove(0)
        if len(l) != 2*len(set(l)):
            a = 0
    else:
        a=0
if a:
      print((2**(N//2))%(10**9+7))
else:
      print(0)
def main():
    n,k,c=map(int,input().split())
    s=list(input())
    l=[0]*(k+1)
    r=[0]*(k+1)
    x=0
    i=0
    while i<=n-1:
        if s[i]=='o':
            x+=1
            l[x]=i+1
            i+=k+1
            if x==k:
                break
        else:
            i+=1
    print(l)
    i=n-1
    while 0<=i:
        if s[i]=='o':
            r[x]=i+1
            x-=1
            i-=k+1
            if x==1:
                break
        else:
            i-=1
    print(r)
    for i in range(1,k+1):
        if l[i]==r[i]:
            print(l[i])

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    n,k,c=map(int,input().split())
    s=list(input())
    l,r=[0]*(k+1),[0]*(k+1)
    x,i=1,0
    while i<=n-1:
        if s[i]=='o':
            l[x]=i+1
            i+=c+1
            x+=1
            if x==k+1:
                break
        else:
            i+=1
    x,i=k,n-1
    while 0<=i:
        if s[i]=='o':
            r[x]=i+1
            x-=1
            i-=c+1
            if x==0:
                break
        else:
            i-=1
    for i in range(1,k+1):
        if l[i]==r[i]:
            print(l[i])

if __name__ == '__main__':
    main()
N, M = map(int, input().split())
WA = [0] * N
AC = [0] * N

for i in range(M):
  p,s = input().split()
  p = int(p)
  if AC[p-1] == 0:
    if s == "AC":
      AC[p-1] = 1
      else:
        WA[p-1] += 1
        
wa = 0
for j in range(N):
  if AC[j] == 1:
    wa += WA[j]
print(sum(AC),wa)

### FIXED CODE ###

N, M = map(int, input().split())
WA = [0] * N
AC = [0] * N

for i in range(M):
  p,s = input().split()
  p = int(p)
  if AC[p-1] == 0:
    if s == "AC":
      AC[p-1] = 1
    else:
        WA[p-1] += 1
        
wa = 0
for j in range(N):
  if AC[j] == 1:
    wa += WA[j]
print(sum(AC),wa)
import numpy as np
import sys
from functools import lru_cache

def main():
    n, q = map(int, input().split())
    ab = [[],[]]
    
    for i in range(n-1):
        na,nb = map(int, input().split())
        ab[0].append(na)
        ab[1].append(nb)

    px = [[],[]]
    for i in range(q):
        np,nx = map(int, input().split())        
        px[0].append(np)
        px[1].append(nx)
    
    # print(n,q,ab,px)
    count = [0 for i in range(n)]

    lgth = max(ab[0])
    node =[[] for i in range(lgth)]
    for i in range(n-1):
        index = ab[0][i]-1
        put = ab[1][i]
        node[index].append(put)

    # print(node)

    def calc(idx,val):
        count[idx] += val

        if idx <= lgth-1:
            for j in node[idx]:
                calc(j-1,val)
        
    for i in range(len(px[0])):    
        calc(px[0][i]-1, px[1][i])
    
    print(' '.join(map(str,count)))


if __name__ == '__main__':
    main()

### FIXED CODE ###

import numpy as np
import sys
from functools import lru_cache

def main():
    n, q = map(int, input().split())
    ab = [[],[]]
    
    for i in range(n-1):
        na,nb = map(int, input().split())
        ab[0].append(na)
        ab[1].append(nb)

    px = [[],[]]
    for i in range(q):
        np,nx = map(int, input().split())        
        px[0].append(np)
        px[1].append(nx)
    
    # print(n,q,ab,px)
    count = [0 for i in range(n)]

    oya_list = [0 for i in range(n)]
    for i in range(len(ab[1])):
        oya_list[ab[1][i]-1] = ab[0][i]
    
    for i in range(len(px[1])):
        count[px[0][i]-1] += px[1][i]
        
    for i in range(1,n):

        count[i] += count[oya_list[i]-1]
    
    print(' '.join(map(str,count)))


if __name__ == '__main__':
    main()
ls = list(map(int, input().split()))
count = 0
for i in ls:
  if ls[i] == 1:
    count += 1
print(count)

### FIXED CODE ###

ls = input()
count = 0
for l in ls:
  if l == '1':
    count += 1
print(count)
a , b = [int(i) for i in intput().split()]
if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a = b")

### FIXED CODE ###

a , b = [int(i) for i in input().split()]
if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")
ans = 0
    for i in input():
        if i == '1':
            ans += 1
    print(ans)

### FIXED CODE ###

ans = 0
for i in input():
    if i == '1':
        ans += 1
print(ans)
# coding: utf-8
A=input('数字を入力＞')
op=raw_input('＞')
B=input('数字を入力＞')
if op == '+':
    print(int(A)+int(B))
else:
    print(int(A)-int(B))

### FIXED CODE ###

# -*- coding: utf-8 -*-

a, op, b = input().split()

if op == '+':
    print(int(a) + int(b))
else:
    print(int(a) - int(b))
import numpy as np
h, w = map(int, input().split())
a = [list(input()) for _ in range(h)]

a = np.array(a).reshape(h, w)
for i, v in enumerate(a):
    if "#" not in v:
        a = np.delete(a, i, 0)

a = np.rot90(a)
for i, v in enumerate(a):
    if "#" not in v:
        a = np.delete(a, i, 0)

a = np.rot90(a, 3)
for i in a:
    print(*i)

### FIXED CODE ###

h, w = map(int, input().split())
a = list(input() for i in range(h))

a = list(zip(*[i for i in a if "#" in i]))
a = list(zip(*[i for i in a if "#" in i]))

for i in a:
    print("".join(i))
N = int(input())
T = [int(input()) for _ in range(N)]

def GCD(a,b):
    x1 = max(a,b)
    x2 = min(a,b)
    x3 = x1 % x2
    if x3 == 0:
        return x2
    else:
        return GCD(x2,x3)
        
ans = T[0]
for i in range(1,N):
    ans = ans * T[i] / GCD(ans,T[i])

print(int(ans))
    

### FIXED CODE ###

N = int(input())
T = [int(input()) for _ in range(N)]

def GCD(a,b):
    x3 = a % b
    if x3 == 0:
        return min(a,b)
    N = GCD(b,x3)
    return N

def lcm(a,b):
    return a*b // GCD(a,b)
        
ans = T[0]
for i in range(1,N):
    ans = lcm(ans,T[i]) 

print(int(ans))
30
384 8895
1725 9791
170 1024
4 11105
2 6
578 1815
702 3352
143 5141
1420 6980
24 1602
849 999
76 7586
85 5570
444 4991
719 11090
470 10708
1137 4547
455 9003
110 9901
15 8578
368 3692
104 1286
3 4
366 12143
7 6649
610 2374
152 7324
4 7042
292 11386
334 5720

### FIXED CODE ###

import sys

N = int(input())
mylist=[]

for i in range(N):
  s = input().split()
  mylist += [[int(s[0]),int(s[1])]]

mylsit = sorted(mylist, key=lambda x:x[1])

mysum = 0
for i in mylsit:
  mysum += i[0]
  if mysum <= i[1]:
    continue
  else:
    print('No')
    sys.exit()
print('Yes')
A,B,C,X = [int(input()) for i in range(4)]
count = 0
for i in range(a + 1):
    for j in range(b + 1):
        for k in range(C + 1):
            if 500 * A + 100 * B + 50 * C == X:
                count += 1
print(count)

### FIXED CODE ###

A,B,C,X = [int(input()) for i in range(4)]
count = 0
for i in range(A + 1):
    for j in range(B + 1):
        for k in range(C + 1):
            if 500 * i + 100 * j + 50 * k == X:
                count += 1
print(count)
from sys import stdin

N = map(int, stdin.readline().rstrip().split())
hon = {2,4,5,7,9}
pon = {0,1,6,8}
bon = {3}

N = N % 10

if N in hon:
    print('hon')
elif N in pon:
    print('pon')
else:
    print('bon')

### FIXED CODE ###

from sys import stdin

N = int(input()) 
hon = {2,4,5,7,9}
pon = {0,1,6,8}
bon = {3}

N = N % 10

if N in hon:
    print('hon')
elif N in pon:
    print('pon')
else:
    print('bon')
def use_fast_io():
    global input
    import io
    import sys
    f = io.BytesIO(sys.stdin.buffer.read())
    input = f.readline


#use_fast_io()

from scipy.sparse.csgraph import floyd_warshall
import numpy as np


def solve():
    n, m, l = map(int, input().split())
    graph = np.full((n, n), 10 ** 10)
    for _ in range(m):
        s, t, w = map(int, input().split())
        if w <= l:
            graph[s - 1][t - 1] = graph[t - 1][s - 1] = w
    graph = floyd_warshall(graph, directed=False)
    graph = floyd_warshall(graph <= l, directed=False)
    graph[np.isinf(graph)] = 0
    Q = int(input())
    ans = []
    for _ in range(Q):
        s, t = map(int, input().split())
        ans.append(int(graph[s - 1][t - 1]) - 1)
    print(*ans, sep='\n')


solve()

if __name__ == '__main__':
    solve()

### FIXED CODE ###


from scipy.sparse.csgraph import floyd_warshall
import numpy as np

N, M, L = map(int, input().split())
graph = np.full((N, N), 10 ** 10)
for _ in range(M):
    s, t, w = map(int, input().split())
    if w <= L:
        graph[s - 1][t - 1] = graph[t - 1][s - 1] = w
graph = floyd_warshall(graph, directed=False)
graph = floyd_warshall(graph <= L, directed=False)
graph[np.isinf(graph)] = 0

Q = int(input())
ans = []
for _ in range(Q):
    s, t = map(int, input().split())
    ans.append(int(graph[s - 1][t - 1]) - 1)
print(*ans, sep='\n')
N=int(input())
M=int((N**(1/2)))

print(min([max([len(str(i)),len(str(int(N/i)))]) for i in range(int(N/2)-M,int(N/2)+M) if N%i==0]))

### FIXED CODE ###

N=int(input())
M=int((N**(1/2)))
mult=0
while 1:
    for i in [-1,1]:
        x=M+i*mult
        if not N%x:
            print(max([len(str(x)),len(str(int(N/x)))]))
            exit()
    mult+=1
rn = lambda :map(int, read().split())
n,m = rn()
A = list(rn())
l = len(A)
d = {}
for x in A:
    if x not in d:
        d[x]=0
    d[x] += 1
for i in range(m):
    b, c = rn()
    if c not in d:
        d[c]=0
    d[c] += b
A = list(d.items())
A.sort(reverse=True)
ans = 0
cnt = l
# print(A)
for v, c in A:
    tmp = min(cnt, c)
    ans += tmp * v
    cnt -= tmp
print(ans)

### FIXED CODE ###

read = input 
rn = lambda :map(int, read().split())
n,m = rn()
A = list(rn())
l = len(A)
d = {}
for x in A:
    if x not in d:
        d[x]=0
    d[x] += 1
for i in range(m):
    b, c = rn()
    if c not in d:
        d[c]=0
    d[c] += b
A = list(d.items())
A.sort(reverse=True)
ans = 0
cnt = l
# print(A)
for v, c in A:
    tmp = min(cnt, c)
    ans += tmp * v
    cnt -= tmp
print(ans)
a, b, c = map(float, input().split())

if 4 * a * b < (c - a - b) ** 2:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

a=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = int(input())
print(a[K-1])
n,m=map(int(input().split()))
a=list(map(int,input().split()))
print(max(-1,n-sum(a)))

### FIXED CODE ###

n,m=map(int,input().split())
print(max(-1,n-sum(list(map(int,input().split())))))
print(round(N/2+0.01))


### FIXED CODE ###

N = int(input())
print(round((N/2)+0.01))
a,b,c = map(int,input().split())
if a + b = c or b + c = a or c + a = b:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

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