peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
#C
import math

N = int(input())


count = [0] * (10010)
for j in range(1, 100):
    for k in range(1, 100):
        for l in range(1, 100):
            v = (j+k+l) ** 2 - (j*k + k*l + l*j)
            if v <= 10000:
                count[v] += 1

for i in range(1, N):
    print(count[i])
# Judge status: Accepted
k = int(input())
mod = 0
for i in range(1, 10**6):
    mod = ((mod * 10) + 7) % k
    if mod == 0:
        print(i)
        exit()
print(-1)
# Judge status: Wrong Answer
n,m=map(int,input().split())
print(min(2*m,(2*n+m)//4))
# Judge status: Accepted
X, Y, A, B, C = map(int, input().split())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))

p.sort(reverse=True)
q.sort(reverse=True)

a = p[:X]
b = q[:Y]
a.extend(b)
a.extend(r)
a.sort(reverse=True)
print(sum(a[:X+Y]))
# Judge status: Accepted
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    a, b = nm()
    print(sum(range(1, b - a)) - a)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n=int(input())
a=[int(input()) for _ in range(n)]
ans=0
for i in range(n-1):
    if a[i]==a[i+1] and a[i]%2==1:
        ans+=a[i]
        a[i+1]=0
    else:
        ans+=int(a[i]/2)
ans+=int(a[n-1]/2)
print(ans)
# Judge status: Wrong Answer
A,B,C=map(int,input().split())
print(min(A+B,B+C,A+C))
# Judge status: Accepted
s =input()
t = input()
len_s = len(s)
len_t = len(t)
ans = 10**10
for i in range(len_s-len_t+1):
    cnt = 0
    for j in range(len_t):
        if s[i+j]!=t[j]:
            cnt+=1
    ans = min(cnt,ans)
print(ans)
# Judge status: Accepted
n, a, b = [int(i) for i in input().split()]
if (b - a) % 2 == 0:
    print((b - a) // 2)
else:
    print(min(a - 1, n - b) + 1 + (b - a - 1) // 2)
# Judge status: Wrong Answer
N = int(input())
A_n = sorted(list(set(map(int, input().split(' ')))), reverse=True)
if len(A_n) == 1:
    print('0')
else:
    count = len(A_n)
    for i in range(len(A_n)-1):
        for j in range(i+1, len(A_n)):
            if A_n[i]%A_n[j] == 0:
                # print(str(A_n[i]) + ' ' + str(A_n[j]))
                count -= 1
                break
    print(count)
# Judge status: Accepted
n = int(input())
As = list(map(int, input().split()))
As.sort(reverse=True)
if (len(As) % 2 == 0):
  ans = sum(As[:len(As) // 2] * 2) - As[0]
else:
  ans = sum(As[:(len(As) + 1) // 2]) * 2 - As[len(As) // 2] - As[0]
print(ans)
# Judge status: Accepted
from sys import stdin
s = int(stdin.readline().rstrip())
if s == 10**18:
    print(0,0,10**9,0,0,10**9)
    exit()
a = s//10**9+1
b = 10**9-s%10**9
print(0,0,10**9,1,b,a)
# Judge status: Accepted
N = int(input())
s = input()
t = input()
for i in range(N):
    tmp_s = ''
    tmp_t = ''
    for k in range(i,N):
        tmp_s += s[k]
    for k in range(0,N-i):
        tmp_t += t[k]
    if tmp_s == tmp_t:
        print(2*N-len(tmp_s))
        exit()
print(2*N)
# Judge status: Wrong Answer
N, T = map(int, input().split())
c, t = list(map(int, input().split()))
ans = 1001
for i in range(N):
    if T > t and c < ans:
        ans = c

if ans == 1000:
    print("TLE")
else:
    print(ans)
# Judge status: Wrong Answer
def resolve():
	n, m = map(int, input().split())
	A = []
	B = ''
	ans = "No"
	for _ in range(n):
		A.append(input())
	for _ in range(m):
		B += input()
	for i in range(n-m):
		for j in range(n-m):
			tmp = ''
			for k in range(m):
				tmp += A[i+k][j:j+m]
			if tmp == B:
				ans = 'Yes'
	print(ans)
resolve()
# Judge status: Accepted
def solve():
    n, y = map(int, input().split())
    r = range(n+1)

    ans = "-1 -1 -1"
    for i in r:
        for j in r:
            k = (y-(10000*i+5000*j))//1000
            if k >= 0 and 10000*i+5000*j+1000*k == y and i+j+k == n:
                ans = "{} {} {}".format(i, j, k)
                print(ans)
                return

    print(ans)


if __name__ == "__main__":
    solve()
# Judge status: Wrong Answer
n,m=map(int,input().split())
A = list(map(int, input().split()))
A = sum(A)
ans = n-A

print(ans)
# Judge status: Accepted
N, A, B, C, D = map(int, input().split())
A, B, C, D = A-1, B-1, C-1, D-1
S = input() + "###"
def chk(l, r):
    for i in range(l, r-1):
        if S[i:i+2] == "##":
            return 0
    return 1

def chk3(l, r):
    for i in range(l, r):
        if S[i:i+3].count("#") == 0:
            return 1
    return 0

if chk(A, C) and chk(B, D) and (C < D or chk3(B-1, D)):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

ans = B[A[0]-1]
for i in range(1, N):
    ans += B[A[i]-1]
    if A[i]-A[i-1] == 1:
        ans += C[A[i-1]-1]

print(ans)
# Judge status: Accepted
n = int(input())
p = list(map(int, input().split()))
ans = 0
for i in range(1, n-1):
    if p[i-1]<p[i]<p[i+1] or p[i+1]<p[i]<p[i-1]:
        ans += 1
print(ans)
# Judge status: Accepted
N, M = map(int, input().split())
l = list(map(int, input().split()))

sum = 0
for e in l:
    sum += e

x = N - sum
if x < 0:
    print(-1)
else:
    print(x)
# Judge status: Wrong Answer
N=int(input())
ans=0
reject=0
A=[]
for i in range(1,N+1):
    ans+=i
    if ans>N:
        reject=ans-N
        for j in range(1,i+1):
            if j!=reject:
                print(j)
        break
# Judge status: Accepted
from collections import Counter
a, b = [], []
N = int(input())
for i in range(N): a.append(input())
M = int(input())
for i in range(M): b.append(input())

c = Counter(a)
max0 = 0
for i in c.most_common(): max0 = max(max0, i[1]-b.count(i[0]))
print(max0)
# Judge status: Accepted
X,Y=map(int,input().split())

a=X
cnt=0
while a <= Y:
    a=2*a
    cnt+=1


print(cnt)
# Judge status: Accepted
import numpy as np

N, M = map(int, input().split())
A = np.array([[i for i in input()] for j in range(N)])
B = np.array([[i for i in input()] for j in range(M)])

found = False
for i in range(N-M+1):
    for j in range(N-M+1):
        P = A[i:i+M,j:j+M]
        if (P == B).all():
            print("Yes")
            found = True
            break
    if found: break
if not found:
    print("No")
# Judge status: Accepted
def resolve():
    x = int(input())
    if x >= 30:
        print('Yes')
        return
    print('No')
resolve()
# Judge status: Accepted
N, Y = map(int, input().split())

for i in range(N+1):
    for j in range(N+1-i):
        if Y == 10000*i + 5000*j + 1000*(N-i-j):
            print(i, j, N-i-j)
            break
    else:
        continue
    break
else:
    print(-1, -1, -1)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
i4=0
i2=0
i0=0
for x in a:
    if x%4==0:i4+=1
    elif x%2==0:i2+=1
    else:i0+=1
if i4>=i0:print("Yes")
elif i4+1==i0 and i2==0:print("Yes")
elif i0==0:print("yes")
else:print("No")
# Judge status: Accepted
N=int(input())
A=list(map(int,input().split()))

sunuke=A[0]
araiguma=sum(A)-sunuke
ans=abs(sunuke-araiguma)

for i in range(1,N-1):
    sunuke+=A[i]
    araiguma-=A[i]
    ans=min(ans,abs(sunuke-araiguma))

print(ans)
# Judge status: Accepted
n, m = map(int, input().split())
H = list(map(int, input().split()))

L = [-1]*n
for i in range(m):
    a, b = map(int, input().split())
    a, b = a-1, b-1
    L[a] = max(L[a], H[b])
    L[b] = max(L[b], H[a])

ans = 0
for i in range(n):
    if H[i] > L[i]:
        ans += 1
print(ans)
# Judge status: Wrong Answer
N=int(input())
H=list(map(int,input().split()))
A,a=0,0
C=[0]*N
H=H[::-1]
for i in range(N-1):
  if H[i]<=H[i+1]:
    A+=1
  else:
    C[a]=A
    a+=1
    A=0
print(max(C))
# Judge status: Accepted
N = int(input())
S = []
c = 0
for i in range(N):
	S.append(input())

S = list(set(S))
print(len(S))
# Judge status: Accepted
c = list(input())
d = list(input())

for i in range(3):
    if c[2 - i] != d[i]:
        print("NO")
        exit()

print("YES")
# Judge status: Accepted
N=int(input())
A=list(map(int,input().split()))
a=A[0]
b=A[N-1]
hidari=1
migi=N-2

for i in range(N-2):
    if a<=b:
        a+=A[hidari]
        hidari+=1
    
    elif a>b:
        b+=A[migi]
        migi-=1

print(abs(a-b))
# Judge status: Wrong Answer
n = int(input())

dic = {}

for i in range(n):
    a = int(input())
    if dic.get(a) is None:
        dic[a] = 1
    else:
        dic[a] += 1 %2
        
    
val = list(dic.values())
ans = int(sum(val))

print(ans)
# Judge status: Wrong Answer
n,m = map(int,input().split())

tmp_list = [[0]for i in range(n)]
p_list = []
y_list = []

for i in range(m):
    p,y = map(int,input().split())
    tmp_list[p-1].append(y)
    p_list.append(p)
    y_list.append(y)

import copy
tmpsort = copy.deepcopy(tmp_list)
for i in range(len(tmp_list)):
    sorted(tmpsort[i])
for i in range(len(p_list)):
    idx = tmpsort[p_list[i]-1].index(y_list[i])
    print((str(p_list[i]).zfill(6) + str(idx).zfill(6)))
# Judge status: Accepted
s = input()
ans = 0
slist = [int(i) for i in s]
for i in range(len(s)-1):
  if slist[i] == slist[i+1]:
    ans += 1
    if slist[i+1] == 1:
      slist[i+1] = 0
    else:slist[i+1] = 1
print(ans)
# Judge status: Wrong Answer
n,k = map(int,input().split())
a = list(map(int,input().split()))

if(len(set(a)) <= k):
    print(0)
else:
    dic_a = {}
    for i in set(a):
        dic_a[i] =a.count(i)
    sum = 0
    a = sorted(dic_a.items(), key=lambda x: x[0])
    for i in range(k,len(a)):
        sum += a[i][1]
    print(sum)
# Judge status: Accepted
N = input()
N_list = list(N)
N = int(N)
K = len(N_list)

ans = int(N_list[0])+(K-1)*9
ans_list = [N_list[0]] + ['9' for _ in range(K-1)]
ans_cand = int(''.join(ans_list))
if N < ans_cand:
    print(ans - 1)
else:
    print(ans)
# Judge status: Accepted
n = int(input())
a_list = [int(x) for x in input().split()]
print(*(a_list[n-1::-2] + a_list[n % 2::2]))
# Judge status: Accepted
n,a,b = map(int,input().split())
if (b-a)%2==0:
  print(int((b-a)//2))
else:
  s = a-1
  b1 = b-s
  c = (b1-1)//2+s+1
  
  t = n-b
  a1 = a+t
  d = (n-a1-1)//2+1+t
  print(min(c,d))
# Judge status: Accepted
a,b,c = map(int, input().split())
print(a*b//2)
# Judge status: Wrong Answer
i = list(map(int, input().split()))
red=list(map(int, input().split()))
green=list(map(int, input().split()))
white=list(map(int, input().split()))
list=[]
a=0
b=0
c=0
for j in range(i[0]):
    a=max(red)
    list.append(a)
for j in range(i[1]):
    b=max(green)
    list.append(b)
for j in range(i[0]+i[1]):
    if max(white)>min(list):
        list.remove(min(list))
        list.append(max(white))
    else:
        break
print(sum(list))
# Judge status: Accepted
a,b,c,d=map(int, input().split())
while True:
  c-=b
  if c<=0:
    print("Yes")
    exit()
  a-=d
  if a<=0:
    print("No")
    exit()
# Judge status: Wrong Answer
N = int(input())
i = 1
while i * i <= N:
  i = i + 1
print(i * i)
# Judge status: Accepted
n, k = map(int, input().split())
x_list = list(map(int, input().split()))

min_dist = float('inf')
for i in range(0, n-(k-1)):
    left = x_list[i]
    right = x_list[i+(k-1)]

    dist = abs(left - right) + min(abs(left), abs(right))
    min_dist = min(dist, min_dist)
print(min_dist)
# Judge status: Accepted
N=int(input())
INF=10**10
dp=[INF]*(N+1)
dp[0]=0
for i in range(N+1):
    if i+1<=N: dp[i+1]=min(dp[i+1],dp[i]+1)
    j=1
    while i+6**j<=N:
        dp[i+6**j]=min(dp[i+6**j],dp[i]+1)
        j+=1
    j=1
    while i+9**j<=N:
        dp[i+9**j]=min(dp[i+9**j],dp[i]+1)
        j+=1
print(dp[N])
# Judge status: Accepted
a,b,c,d=map(int, input().split())
print("Yes" if (abs(a-c)<=d) or (abs(a-b)<=d) and (abs(b-c)<=d) else "No")
# Judge status: Wrong Answer
a,b,x = map(int,input().split())
ans = 0
if (b-a)%x==0:
    print((b-a)//x + 1)
else:
    print((b-a)//x)
# Judge status: Wrong Answer
s = input()
t = input()
s_long = len(s)
t_long = len(t)
ok = []
for i in range(s_long - t_long+1):
  part_s = s[i:i+t_long]
  check = True
  for j in range(t_long):
    if part_s[j] != "?" and part_s[j] != t[j]:
      check = False
  if check == True:
    ok.append(i)
  
if len(ok) == 0 or t_long > s_long:
  print("UNRESTORABLE")
else:
  a = max(ok)
  s = s[:a] + t + s[a + t_long + 1:]
  s = list(s)
  for i in range(len(s)):
    if s[i] == "?":
      s[i] = "a"
  print("".join(s))
# Judge status: Wrong Answer
n,m,k = map(int,input().split())

for i in range(m):
  for j in range(n):
    if j*(m-i)+i*(n-j)==k:
      print("Yes")
      exit()
      
print("No")
# Judge status: Accepted
n,k=map(int,input().split())
a=sorted([list(map(int,input().split())) for i in range(n)])
i=0
while True:
  if k-a[i][1]>0:
    k-=a[i][1]
  else:
    print(a[i][0])
    exit()
  i+=1
# Judge status: Wrong Answer
import math

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

e = c*d//math.gcd(c,d)

x = b//c-a//c 

x += b//d-a//d

x -= b//e-a//e 

if a%c == 0:
    x += 1
    
if a%d == 0:
    x += 1
    
if a%e == 0:
    x += 1
    
print(b-a-x+1)
# Judge status: Accepted
from collections import deque

k = int(input())
count = 0
q = deque(range(1,10))

while count < k:
    l = q.popleft()
    resid = l % 10
    if resid != 0: q.append(l*10 + resid - 1)

    q.append(l*10 + resid)
    
    if resid != 9: q.append(l*10 + resid + 1)
    
    count += 1

print(l)
# Judge status: Accepted
k, n = map(int, input().split())
a = list(map(int, input().split()))

a.append(a[0] + k)
ans = min([k - a[i + 1] + a[i] for i in range(n)])
print(ans)
# Judge status: Accepted
N = int(input())

if N % 2 == 0:
    print(int(N / 2))
else:
    print(int(N/2)+1)
# Judge status: Accepted
line = input()
a, b, k = line.split(" ")
a = int(a)
b = int(b)
k = int(k)

if k >= a+b:
    print(0,0)
else:
    if a - k < 0:
        print(0, b-(k-a))
    else:
        print(a - k, b)
# Judge status: Wrong Answer
import itertools
N=int(input())
A=list(map(int,input().split()))

B=list(itertools.combinations(A, 2))
SUM=0

for b1, b2 in B:
  SUM= SUM+((b1^b2)%(10**9+7))

print(SUM%10**9+7)
# Judge status: Accepted
N,M = [int(i) for i in input().split()]
submissions = {str(i):[] for i in range(1,N+1)}
AC,WA = 0,0
for i in range(M):
    P,S = [j for j in input().split()]
    submissions[P].append(S)
for i in submissions:
    if 'AC' not in submissions[i]:
        continue
    for j in submissions[i]:
        if j == 'AC':
            AC+=1
            break
        WA +=1
print(AC,WA)
# Judge status: Wrong Answer
N=list(map(int,input().split()))
if sorted(N)==[5,7,7]:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
strings = input()
alpha = [i for i in range(97, 123)]
srcset = set()
for c in strings:
    srcset.add(ord(c))
for c in srcset:
    alpha.remove(c)
dst = chr(alpha[0]) if alpha else None
print(dst)
# Judge status: Accepted
import sys
import  math
import fractions
from collections import defaultdict
import copy
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

N=int(input())
A=nl()
mod=10**9+7
sum_a=sum(A)
ans=0
for i in range(N):
    sum_a=sum_a-A[i]
    ans+=sum_a*A[i]
    ans%=mod

print(ans)
# Judge status: Accepted
S =input()
a =int(len(S)/ 2)
#print(a)
x =0

#print(S[0:a])
#print(S[a:2*a])


for i in range(a):
    #print(S[i],S[-(i+1)])
    if S[i] != S[-(i+1)]:
        x += 1

print(x)
# Judge status: Accepted
N = int(input())
a = list(map(int,input().split()))

sum = sum(a)

list_temp = [0 for i in range(10**5)]

for i in range(N):
    list_temp[a[i]-1] += 1

Q = int(input())
ans = [0 for i in range(Q)]

for i in range(Q):
    b, c = list(map(int,input().split()))
    sum += (c-b)*list_temp[b-1]
    list_temp[c-1] += list_temp[b-1]
    list_temp[b-1] = 0
    ans[i] = sum
for i in range(Q):
    print(ans[i])
# Judge status: Wrong Answer
#!/usr/bin/env python3

N = int(input())
# S = input()
# N, K = map(int, input().split())
# A = list(map(int, input().split()))
mod = 10 ** 9
from functools import reduce
from fractions import gcd

def main():
    T = sorted(list(set([int(input()) for _ in range(N)])))
    if len(T) == 1:
        print(T[0])
        exit()
    ans = (T[0] * T[1]) // gcd(T[0], T[1])
    for i in range(len(T) - 2):
        ans = ans / gcd(ans, T[i + 2]) * T[i + 2]
    print(ans)

if __name__ == "__main__":
    main()
# Judge status: Accepted
s = input()
len_s = len(s)
pre = 0
mod = [0]*2019
mod[0]=1
x = 1
for i in range(len_s):
    pre = (x*int(s[len_s-i-1])+pre)%2019
    mod[pre] += 1
    x *= 10
    x %= 2019
print(sum([m*(m-1)//2 for m in mod]))
# Judge status: Wrong Answer
s,t = input().split()
a,b = map(int,input().split())
u = input()
if u == "red":
    print(a-1,b)
else:
    print(a,b-1)
# Judge status: Accepted
import sys
from collections import Counter
n = int(input())
a_ls = [int(i) for i in sys.stdin.readline().split()]
ct = Counter(a_ls)
flg = False
new_ct = []
for i, j in sorted(ct.items(), key=lambda x:x[0], reverse=True):
    if j >= 4:
        flg = True
    if j > 1:
        new_ct.append((i, j))
if len(new_ct) == 0:
    print(0)
elif len(new_ct) == 1 and not flg:
    print(0)
else:
    if new_ct[0][1] >= 4:
        print(new_ct[0][0] ** 2)
    else:
        print(new_ct[0][0] * new_ct[1][0])
# Judge status: Accepted
a, b, c = map(int, input().split())
print("YES" if (b-a) == (c-b) else "NO")
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
d=a//b
if (d+1)*b<=a:
  d+=1
print(min(d,c))
# Judge status: Accepted
# coding: utf-8
 
 
def main():
 
    n_haku = int(input())
    k_haku = int(input())
    x_yen = int(input())
    y_yen = int(input())
    
    if n_haku <= k_haku:
        ryokin = x_yen * n_haku
    else:
        ryokin = x_yen * k_haku + y_yen * (n_haku - k_haku)

    print(ryokin)    
    
    return 0
 
 
if __name__ == '__main__':
    main()
# Judge status: Accepted
N, A, B = map(int, input().split())
ans = 0

for i in range(N):
    num = i+1
    sum = 0
    for j in range(5):
        sum += num%10
        num = num//10
    if A <= sum <= B:
        ans += i+1

print(ans)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
a.sort()
ans = 1
print(a)

for i in range(n-1):
    for j in range(i+1, n):
        if a[j] > a[i] + 2:
            #print(i, j)
            if (j - i) > ans:
                ans = (j - i)
            break
print(ans)
# Judge status: Accepted
n,a,b = map(int,input().split())
s = input()
x = a + b
y = 1
z = 1
for i in range(n):
    if s[i] == 'a':
        if y <= x:
            print('Yes')
            y += 1
        else:
            print('No')
    elif s[i] == 'b':
        if y <= x and z <= b:
            print('Yes')
            y += 1
            z += 1
        else:
            print('No')
    else:
        print('No')
# Judge status: Wrong Answer
N,K,S=map(int,input().split())
if S!=10**9:
  l=(str(S)+" ")*K+(str(S+1)+" ")*(N-K)
  print(l)
else:
  l=(str(S)+" ")*K+(str(1)+" ")*(N-K)
# Judge status: Accepted
n=int(input())
t,a=map(int,input().split())
L=list(map(int,input().split()))

res=10**10


for i in range(n):
	if res>abs((t-L[i]*0.006)-a):
		res=abs((t-L[i]*0.006)-a)
		ress=i+1
		
print(ress)
# Judge status: Accepted
N, K = map(int,input().split())
MOD = 10**9+7
ans = 0

for i in range(K, N + 2):
    MIN = (i * (i - 1))//2
    MAX = (N * i) - MIN #例えば10,9,8なら(10-0),(10-1),(10-2)
    ans += MAX - MIN + 1
    ans %= MOD
print(ans)
# Judge status: Wrong Answer
A=[int(input())for _ in[0]*5]
B=[-(-a//10)*10-a for a in A]
print(sum(B)+sum(A)-max(B))
print(B)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
s=[0]*n
for i in range(n):
	s[a[i]-1]=i+1
	
	
print(*s)
# Judge status: Accepted
import sys
input = sys.stdin.readline
L,R,d= map(int,input().split())

ans = 0
for i in range(L,R+1):
    if i % d == 0:
        ans += 1
print(ans)
# Judge status: Accepted
n, k = map(int, input().split())
m = n - 1
l = k - 1

if m % l == 0:
    print(m // l)
else:
    print(m // l + 1)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int,input().split()))
dic = {}
for i in range(N):
    data = A[i]
    if data in dic:  dic[data] += 1
    else:  dic[data] = 1
temp1, temp2 = 0, 0
for i in sorted(dic.keys())[::-1]:
    if dic[i] >= 2:
        if temp1 == 0:  temp1 = i
        else:
            temp2 = i
            break
ans = temp1 * temp2
print(ans)
# Judge status: Accepted
import math
a, b = input().split()
c = int(a+b)
d = math.sqrt(c)
for i in range(1,1000):
  if d == i:
    print('Yes')
    exit()
print('No')
# Judge status: Wrong Answer
N = int(input())
al = []
alphavets = "abcdefghijklmn"

def solve(N, s):

    if len(s) == N:
        al.append(s)
        return 
    
    for i in range(len(s)+1):
        solve(N, s + alphavets[i])

solve(N, alphavets[0])

al = sorted(al)
for i in al:
    print(i)
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
S = list(map(int, list(input())[: -1]))
K = int(input())
if S[0] == 1:
  if K == 1: print(1)
  else: print(S[1])
else: print(S[0])
# Judge status: Accepted
def exchg(a, b, c):
	count = 0
	if (a == b == c) and ((a & 1) == 0 and (b & 1) == 0 and (c & 1) == 0):
		return -1
	while((a & 1) == 0 and (b & 1) == 0 and (c & 1) == 0):
		a, b, c = (a+b)//2, (b+c)//2, (c+a)//2
		# print(a, b, c)
		count += 1
	return count
a, b, c = map(int, input().split())
print(exchg(a, b, c))
# Judge status: Wrong Answer
N = input()

ans = 0
for i in range(len(N)):
    n = int(N[i])
    if n < 6:
        ans += n
    else:
        ans += 10 - n

if N[-1] == "0":
    print(ans)
else:
    print(ans + 1)
# Judge status: Accepted
n,k=map(int,input().split())
a=list(map(int,input().split()))


for i in range(k,n):
    if a[i]>a[i-k]:
        print('Yes')
    else:
        print('No')
# Judge status: Wrong Answer
a,b,x=map(int, input().split())

import math
if 0.5*a**2*b<=x:
    ans=math.atan(2*(1/(a**2)*(a*b-x/a)))
    ans=math.degrees(ans)
else:
    ans=math.atan((a*b**2)/(x/2))
    ans=math.degrees(ans)

print(ans)
# Judge status: Accepted
a,b=map(int,input().split())
if 1<=a<=9 and 1<=b<=9:
  print(a*b)
else: print(-1)
# Judge status: Accepted
n=int(input())
l=[]
for _ in range(n):
    a,b=map(int,input().split())
    l.append((b,a))
l.sort()
#print(l)
t=0
for i in l:
    b=i[0]
    a=i[1]
    if t>b-a:
        print('No')
        exit()
    else:
        t+=a
print('Yes')
# Judge status: Wrong Answer
h1,m1,h2,m2,k=map(int,input().split())
minute=(h2-h1)*60+(m2-m1)-2
t=minute//k
print(t*k)
# Judge status: Wrong Answer
x,y=map(int,input().split())
if {x,y}<={1,3,5,7,8,10,12} or {x,y}<={2,4,6,9,11}:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
from collections import Counter

n, k = map(int, input().split())
a = input().split()
d = sorted(Counter(a).values())
ans = 0

for i in range(len(d) - k):
    ans += d[i]

print(ans)
# Judge status: Accepted
import math
N, D = map(int, input().split())
print((math.ceil(N/(D*2+1))))
# Judge status: Accepted
#!/usr/bin/env python

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

def check(x):
    now = 0 
    for i in range(n):
        now += (a[i]-1)//x
    return now <= k

l = 0 
r = int(1e9)
while r-l > 1:
    mid = (l+r)//2

    if check(mid):
        r = mid 
    else:
        l = mid 

print(r)
# Judge status: Accepted
L = int(input())
ans = (L/3)**3
print(ans)
# Judge status: Accepted
x, y = map(int, input().split())
if x >= 0 and y >= 0:
    if x <= y:
        ans = abs(x-y)
    elif y == 0:
        ans = abs(x-y)+1
    else:
        ans = abs(x-y)+2
elif x < 0 and y <= 0:
    if x <= y:
        ans = abs(x-y)
    else:
        ans = abs(x-y)+2
else:
    ans = abs(abs(x)-abs(y))+1
print(ans)
# Judge status: Wrong Answer
S,T = map(str, input().split())
print('{}{}'.format(S,T))
# Judge status: Accepted
N, M = map(int, input().split())
adj = [[] for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    adj[a-1].append(b-1)
    adj[b-1].append(a-1)
start = 0
queue = [start]
pre = [None]*N
pre[0] = 0
while queue:
    v = queue.pop(0)
    for i in adj[v]:
        if pre[i] is None:
            pre[i] = v
            queue.append(i)
if None in pre:
    print("No")
else:
    print("Yes")
    for p in pre[1:]:
        print(p+1)