peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

import math
ans = math.ceil(n/a)
if a<=b:
    ans += 1
else:
    ans = math.ceil(n/b)+1
if b<=c:
    ans += 1
else:
    ans = math.ceil(n/min(c,a))+2
if c<=d:
    ans += 1
else:
    ans = math.ceil(n/min(d,b,a))+3
if d<=e:
    ans += 1
else:
    ans = math.ceil(n/min(e,a,b,c))+4
print(ans)
# Judge status: Wrong Answer
import numpy as np
d = int(input())
c = list(map(int, input().split()))
s = np.array([list(map(int, input().split())) for _ in range(d)])

init = np.ones(d)

print(*init, sep="\n")
# Judge status: Wrong Answer
n = int(input())
a_input = input()
a = a_input.split(" ")
b_input = input()
b = b_input.split(" ")
c_input = input()
c = c_input.split(" ")

b_sum = 0
for i in range(n):
    b_sum += int(b[i])

c_sum = 0
for i in range(n-1):
    if int(a[i]) != n:
        c_sum += int(c[int(a[i])-1])
    else:
        c_sum += 0

sum = b_sum + c_sum
print(sum)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
A.sort()
cnt = 1
Mcnt = 0
for i in range(0,N-1):
  for j in range(i+1,N):
      if A[j] - A[i] <= 2:
        cnt += 1
      else:
        if Mcnt < cnt:
          Mcnt = cnt
        cnt = 1
print(Mcnt)
# Judge status: Accepted
m, n = (map(str, input().split()))
print(n+m)
# Judge status: Wrong Answer
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))

print("No War" if max(x) < min(y) else "War")
# Judge status: Accepted
n = int(input())
c = input()

left = 0
right = n - 1
cnt = 0

while left < right:
  while left < right:
    if c[left] == "W":
      break;
    left += 1
  while left < right:
    if c[right] == "R":
      break;
    right -= 1
  if left < right:
    cnt += 1
  left += 1
  right -= 1
#

print(cnt)
# Judge status: Accepted
i=list(map(int,input().split()))
i.sort()
print('Yes' if i[0]+i[1]==i[2] else 'No')
# Judge status: Wrong Answer
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    X, N = map(int, rl().split())
    p = set(map(int, rl().split()))
    
    ans = -1
    d_min = 1000
    for i in range(101):
        if i not in p:
            if abs(X - i) < d_min:
                d_min = abs(X - i)
                ans = i
    print(ans)


if __name__ == '__main__':
    solve()
# Judge status: Wrong Answer
# coding: utf-8

S = input()

S = S.replace("7","8")
print(S)
# Judge status: Accepted
N = int(input())
s = len(str(N))
t = 0
for i in range(0,s//2):
    t = t+9*10**(i*2)
if s%2 == 1:
    t = t+N-10**(s-1)+1
print (t)
# Judge status: Accepted
grid = [list(map(int,input().split()))for i in range(3)]


for a1 in range(-10000,10001):
    b1 = grid[0][0] - a1
    a2 = grid[1][0] - b1
    a3 = grid[2][0] - b1
    b2 = grid[0][1] - a1
    b3 = grid[0][2] - a1

    if a2+b2 == grid[1][1] and a2+b3 == grid[1][2] and a3+b2 == grid[2][1] and a3+b3 == grid[2][2]:
        print('Yes')
        break
else:print('No')
# Judge status: Accepted
N = int(input())
B = list(map(int, input().split()))

r = B[0] + B[N-2]
for i in range(N-2):
  r += B[i+1] if B[i] > B[i+1] else B[i]
print(r)
# Judge status: Accepted
from itertools import accumulate

n, k = map(int, input().split())
a = list(map(int, input().split()))
for _ in range(k):
   b = [0] * n
   for i in range(n):
      b[max(0, i-a[i])] += 1
      tmp = i + a[i] + 1
      if tmp < n:
         b[tmp] -= 1
   a = list(accumulate(b))
   if a == [n] * n:
      break

print(*a)
# Judge status: Accepted
import bisect
n = int(input())
l_li = list(map(int,input().split()))
l_li.sort()
ans = 0
for i in range(n-2):
    for j in range(i+1,n-1):
        ind = bisect.bisect_left(l_li,l_li[i]+l_li[j])
        num = ind-1 - j
        if num > 0:
            ans += num
print(ans)
# Judge status: Accepted
c,a,b=map(int,input().split())
print(a*c//2)
# Judge status: Wrong Answer
from collections import defaultdict
N = int(input())
raw_numbers = list(map(int, input().split()))
numbers = defaultdict(int)

for num in raw_numbers:
    numbers[num] += 1
    
total = sum(raw_numbers)
    
Q = int(input())

for _ in range(Q):
    a, b = list(map(int, input().split()))
    numbers[b] += numbers[a]
    total -= a * numbers[a]
    total += b * (numbers[b] - numbers[a])
    numbers[a] = 0
    print(total)
# Judge status: Accepted
li  = list(input())

if(li[2] == li[3] and li[4] == li[5]):
  print("Yes")
else:
  print("No")
# Judge status: Accepted
N,K=map(int,input().split())
P= [list(map(int,input().split())) for i in range(2*K)]
count=0
Q=[]
for t in range(1,2*K,2):
    Q.append(P[t])

R=[]
for u in range(0,len(Q)):
    for s in range(0,len(Q[u])):
        R.append(Q[u][s])

for j in range(1,N+1):
    if j not in R:
        count=count+1
    else:
        count=count
print(count)
# Judge status: Accepted
N,M=map(int,input().split())

if N%2==1:
    S=1
    L=N
    for i in range(M):
        print(S+i,L-i)
else:
    S=1
    L=N
    for i in range(M):
        if S+i>N/4:
            print(S+i,L-i-1)
        else:
            print(S+i,L-i)
# Judge status: Wrong Answer
N, M = map(int, input().split())
print(N * M -(2 * N + 2 * M - 4))
# Judge status: Accepted
from fractions import gcd

n, x = list(map(int, input().split()))
l = [int(i) for i in input().split()]
m = [abs(i - x) for i in l]

res = 0
for i in range(0, len(m)):
    res = gcd(res, m[i])
print(res)
# Judge status: Accepted
a = int(input())
a2 = a*a
a3 = a2 * a

print(a + a2 + a3)
# Judge status: Accepted
import sys
input = lambda :sys.stdin.readline().rstrip()

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

if x > sum(A):
  cnt = -1
else:
  cnt = 0
  
for i in range(N):
    if x - A[i] >= 0:
        cnt += 1
        x -= A[i]
    if x <= 0:
        break
    #print(cnt, x)

print(cnt)
# Judge status: Accepted
A, B, C = map(int, input().split())
if (A*B*C) % 2 == 0:
    print(0)
else:
    print(min(A*B, B*C, C*A))
# Judge status: Accepted
n = int(input())
a = [int(i)//400 for i in input().split() if int(i)<3200]
x = len(set(a)) 
y = n-len(a) 

if x == 0:
    print(1,y)
else:
    print(x,x+y)
# Judge status: Accepted
s = input()
t = input()

if t.startswith(s):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
#!/usr/bin/env python3
import re
s = input()
s = re.sub(r'erase(r|)',"", s)
s = re.sub(r'dream(er|)',"", s)
print('YNEOS'[s!=""::2])
# Judge status: Wrong Answer
def num2str(n): # 1,2,3... -> a,b,c,...
	if n == 0:
		return 'z'
	else:
		return chr(ord('a') + n-1)

N = int(input())

ans = ''
while N > 26:
	ans = num2str(N%26) + ans
	N = int(N/26)
ans = num2str(N%26) + ans

print(ans)
# Judge status: Accepted
a=1
for i in range(int(input())):
 a*=i+1;a%=10**9+7
print(a)
# Judge status: Accepted
n = int(input())
xl = [list(map(int, input().split())) for _ in range(n)]
A = sorted([(x+l, x-l) for x, l in xl])
now = A[0][0]
cnt = 1
for i, j in A:
  if now <= j:
    cnt += 1
    now = i
print(cnt)
# Judge status: Wrong Answer
n,l=map(int,input().split())
taste = [l+i for i in range(n)]
s=sum(taste)
for i in range(l+n+2):
  if i in taste:
    print(s-i)
    exit()
  if -i in taste:
    print(s+i)
    exit()
# Judge status: Wrong Answer
def main():
 S = str(input())

 if 'hi' in S:
   print('Yes')
 else:
  print('No')

if __name__ == "__main__":
  main()
# Judge status: Accepted
n = int(input())
ans = 0
for k in range(1, n + 1):
  m = n // k
  mc2 = (m * (m + 1)) // 2
  ans += mc2 * k
print(ans)
# Judge status: Wrong Answer
def main():
    a,v = map(int,input().split())
    b,w = map(int,input().split())
    t = int(input())
    if v == w:
        print('NO')
        return 0
    elif abs((a-b)/(v-w)) <= t:
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':
    main()
# Judge status: Accepted
a = list(input())
b = list(input())
c = list(input())

t = a.pop(0)
while True:
  if t == "a":
    if a == []:
      print("A")
      exit()
    else: t = a.pop(0)
  elif t == "b":
    if b == []:
      print("B")
      exit()
    else: t = b.pop(0)
  elif t == "c":
    if c == []:
      print("C")
      exit()
    else: t = c.pop(0)
# Judge status: Accepted
from collections import defaultdict
n,k=map(int,input().split())
l=list(map(int,input().split()))
d=defaultdict(int)
for i in range(n):
    d[i+1]=l[i]
visited=set()
l=[]
i=1
while True:
    l.append(i)
    if i not in visited:
        visited.add(i)
    else:
        break
    i=d[i]
first=l.index(l[-1])
if k<first:
    print(l[k])
else:
    k=(k-first)%((len(l)-1)-first)
    k+=first
    print(l[k])
# Judge status: Accepted
N, A, B = map(int, input().split())

num = A if (N%(A+B)) > A else N%(A+B)

ans = (N//(A+B))*A + num

print(ans)
# Judge status: Accepted
X, Y = map(int, input().split())

if (X % Y == 0): print(-1)
else: print(X)
# Judge status: Accepted
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

s, w = map(int, read().split())
if w >= s:
    print('unsafe')
else:
    print('safe')
# Judge status: Accepted
#!/usr/bin/python3
# -*- coding:utf-8 -*-

from math import ceil

def main():
  a, b = map(int, input().strip().split())
  print(ceil((b - 1) / (a - 1)))

if __name__=='__main__':
  main()
# Judge status: Accepted
a = input()
print('A' + a[8] + 'C')
# Judge status: Accepted
n,k = map(int,input().split())
for i in range(k):
    d = int(input())
    a = list(map(int,input().split()))
    if i == 0:
        ans = [i for i in range(1,n+1)]
    for i in a:
        if i in ans:
            ans.remove(i)
print(len(ans))
# Judge status: Accepted
n = int(input())
aa = list(map(int, input().split()))
bb = list(map(int, input().split()))

ans = 0
for i in range(n):
    t1 = min(aa[i], bb[i])
    aa[i] -= t1
    bb[i] -= t1
    ans += t1
    t2 = min(aa[i+1], bb[i])
    aa[i+1] -= t2
    ans += t2
print(ans)
# Judge status: Wrong Answer
a=list(map(int,input().split()))
for v in range (4):
  if a[v]==0:
    print(v+1)
# Judge status: Wrong Answer
N, K = map(int, input().split(" "))
H = list(map(int, input().split(" ")))

if N <= K:
  print(0)
else:
  if K == 0:
    c = sum(H)
  else:
    c = sum(H[:-K])
  print(c)
# Judge status: Accepted
A,B,T = map(int,input().split())

print(T//A*B)
# Judge status: Accepted

X=int(input())
def isp(n):
    for i in range(2,n):
        if n%i==0:return False
    return True

while True:
    if isp(X):
        print(X)
        exit(0)
    X+=1
# Judge status: Accepted
from collections import Counter

N = int(input())
A = list(map(int, input().split()))
cnt_A = Counter(A)
ans = sum([k * (k - 1) // 2 for k in cnt_A.values()])

for i in range(N):
    print(ans - (cnt_A[A[i]] - 1))
# Judge status: Accepted
import sys
input=sys.stdin.readline
k,x=map(int,input().split())
if 500*k>=x:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n,x,t = map(int, input().split())
if n%x==0:
  print((n//x)*t)
else:
  print((n//x + 1)*t)
# Judge status: Accepted
from itertools import permutations
import math
menu=5
times=[int(input()) for i in range(menu)]
orders=list(permutations(times,menu))
minimum=sum(math.ceil(time/10)*10 for time in times)
for order in orders:
    total=order[0]
    for i in range(1,menu):
        total+=math.ceil(order[i]/10)*10
    minimum=min(minimum,total)
print(minimum)
# Judge status: Wrong Answer
N,K = list(map(int,input().split()))
S = input()
if N == 1:
    print(0)
else:
    lc = S.count('L')
    rc = N-lc
    maxc = lc+rc-2
    nowc = 0
    now = S[0]
    for i in range(1,N):
        if S[i] == now:
            nowc += 1
        else:
            now = S[i]
    print(min(nowc+2*K,maxc))
# Judge status: Accepted
N,K=map(int,input().split())
if abs(N-(N//K)*K)<abs((N-(N//K)*K)-K):
    print(N-(N//K)*K)
else:
    print(abs((N-(N//K)*K)-K))
# Judge status: Wrong Answer
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        x,y=map(int,input().split())
        if y%x==0:
            return -1
        else:
            i=1
            while True:
                if i*x%y!=0:
                    return i*x
                    break    
    print(main())
resolve()
# Judge status: Accepted
from collections import deque


def main():
    sas = deque(list(input()))
    sbs = deque(list(input()))
    scs = deque(list(input()))

    deques = {"A": sas, "B": sbs, "C": scs}
    player = "A"
    while True:
        if len(deques[player]) == 0:
            ans = player
            break
        player_temp = deques[player].popleft()
        player = player_temp.upper()
    print(ans)


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
S = input()
T = input()

N = len(S)

for i in range(1, N):
    if S[N-i:] + S[:N-i] == T:
        print('Yes')
        exit()
print('No')
# Judge status: Accepted
n=int(input())
AB=[]
A=[]
B=[]
for _ in range(n):
    a,b = map(int,input().split())
    AB.append((a,b))
    A.append(a)
    B.append(b)
A.sort()
B.sort()
#AB = sorted(AB,key=lambda x: x[1])
med = n//2
if n%2 != 0:
    print(B[n//2]-A[n//2]+1)
else:
    p = (A[n//2] + A[n//2-1])/2
    q = (B[n//2] + B[n//2-1])/2
    print(int((q-p)*2+1))
# Judge status: Wrong Answer
S = list(input())
for i in S:
    if i == "1":
        continue
    else:
        print(i)
        break
# Judge status: Accepted
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())

dif = abs(b-a)
waru = v - w
if waru <= 0:
    print('NO')
    exit()
tmp = dif/waru
#print(tmp)
if tmp<=t:
    print('YES')
else:
    print('NO')
# Judge status: Wrong Answer
from math import log2

def main():
    N = int(input())
    if N <= 0:
        print(0)
        return
    K = int(log2(abs(N))) + 1
    Ans = []
    for _ in range(K):
        r = N%2
        Ans.append(r)
        N = -1*( N // 2)
    print(*Ans[::-1],sep="")
    return

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
import sys
N,M,X,Y = map(int,input().split())
x =  list(map(int,input().split()))
y =  list(map(int,input().split()))
#print(x)
#print(max(x),min(y))
for Z in range(X+1,Y+1):
    if max(x) < min(y):
        if max(x) >= Z and Z <= min(y):
            print("No War")
            sys.exit()
print('War')
# Judge status: Accepted
N = int(input())
S = list(input())

dp = [0 for j in range(len(S)+1)]

for i in range(len(S)):
    if S[i] == "I":
        dp[i+1] = dp[i] + 1
    else:
        dp[i+1] = dp[i] - 1

print(max(dp))
# Judge status: Accepted
s = list(input())
before = []
cnt = 0
for i,now in enumerate(s):
    if i == 0 or len(before) == 0:
        before.append(now)

        continue
    if before[-1] != now:
        before.pop()
        cnt += 2
    else:
        before.append(now)

print(cnt)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if a%2 or b%2 or c%2:
  ans=min([a*b,a*c,b*c])
else:
  ans=0
print(ans)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
sousa=sum(b)-sum(a)
cnt=0
for i in range(n):
	if b[i]>a[i]:
		cnt+=(b[i]-a[i]+1)//2
if sousa>=cnt:
	print("Yes")
else:
	print("No")
# Judge status: Accepted
N = int(input())
x = 0

for i in range(N):
    x += i + 1

print("{}".format(x))
# Judge status: Wrong Answer
n=int(input())
arr=[0]*n
for i in range(n):
  arr[i]=int(input())
tmp=sorted(arr,reverse=True)
arrMax=tmp[0]

for i in range(n):
  if arr[i]==arrMax:
    if tmp[0]==tmp[1]:
      print(tmp[1])
    else:
      print(tmp[0])
  else:
    print(tmp[1])
# Judge status: Accepted
n = int(input())

if (n + 1) % 108 == 0:
    print(':(')
else:
    if n % 108 == 0:
        print(n // 108 * 100)
    else:
        a = int(n / 1.08)
        for i in range(a, a + 3):
            s = i * 1.08
            if n <= s and s < n + 1:
                print(i)
                break
            if i == a + 2:
                print(':(')
# Judge status: Wrong Answer
n, k= map(int, input().split())
h = list(map(int, input().strip().split()))
import numpy as np
hnp = np.asarray(h)
if(k >= n):
    print(0)
else:    
    s = n-k
    print(np.sum(hnp[:s]))
# Judge status: Accepted
N = int(input())
cnt = 0
for a in range(1, N):
    for b in range(a, N, a):
        cnt += 1
print(cnt)
# Judge status: Accepted
n,t=map(int,input().split())
ct=[list(map(int,input().split())) for i in range(n)]
ans=10**8
for i in ct:
    if i[1]<=t:
        ans=min(ans,i[0])
if ans==10**8:
    print("TLE")
else:
    print(ans)
# Judge status: Wrong Answer
numeros = [int(x) for x in input().split()]
k = int(input())
index_maior = 0
maior = numeros[0]
for index, value in enumerate(numeros):
    if value > maior:
        maior = value
        index_maior = index
numeros[index_maior] = numeros[index_maior] * 2 * k
print(sum(numeros))
# Judge status: Accepted
n, m = map(int, input().split())
alist = list(map(int, input().split()))
alist.sort(reverse=True)
tot = sum(alist)
if alist[m-1] < tot/(4*m):
  print('No')
else:
  print('Yes')
# Judge status: Accepted
# E - Rotation Matching

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

if N%2:
    for i in range(M):
        print(i+1, N-(i))
else:
    for i in range(M):
        if (i+1)+(N-(N-(i+1))) < N-(i+1)-(i+1):
            print(i+1, N-(i+1))
        else:
            print(i+2, N-(i+1))
# Judge status: Accepted
import sys
x,a,b = map(int,input().split())

if b <= a:
  print("delicious")
elif a + x >= b:
  print("safe")
else:
  print("dangerous")
# Judge status: Accepted
l=list(map(int,input().split()))
ans=l[0]*l[1]//2
print(ans)
# Judge status: Accepted
def func(A, B, C):
    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        return 0
    if A == B and B == C:
        return -1
    return func((B+C)//2, (C+A)//2, (A+B)//2) + 1


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

ans = func(A, B, C)

print(ans)
# Judge status: Accepted
z=list(map(int,input().split()))
a=z[0]//z[1]
if z[0]%z[1]!=0:
       a+=1
print(a)
# Judge status: Accepted
from itertools import permutations
n  = int(input())
P = list(map(int, input().split()))
Q = list(map(int, input().split()))
comb = list(permutations([i for i in range(1, n + 1)]))
comb.sort()
a = 0
b = 0

for i in range(len(comb)):
    if list(comb[i]) == P:
        a = i
    if list(comb[i]) == Q:
        b = i
ans = abs(a - b)
print(ans)
# Judge status: Wrong Answer
s=input()
s=sorted(s)
l=['a','b','c']
if s==l:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
n,m,x,y = map(int,input().split())
x_L = list(map(int,input().split()))
y_L = list(map(int,input().split()))

L = []
for i in range(x+1,y+1):
    falg = True
    if max(x_L) < i and min(y_L) >= i:
        print("No War")
        exit()

print("War")
# Judge status: Wrong Answer
n = int(input())
ac,wa,tle,re = 0,0,0,0
for i in range (n):
  s = input()
  if s == "AC":
    ac += 1
  elif s == "WA":
    wa += 1
  elif s =="TLE":
    tle += 1
  else:
    re += 1
print("AC × "+str(ac))
print("WA × "+str(wa))
print("TLE × "+str(tle))
print("RE × "+str(re))
# Judge status: Wrong Answer
(N, K) = map(lambda a: int(a), input().split())
A = list(map(lambda a: int(a), input().split()))


def proc():
    global A
    B = [0 for _ in range(N)]

    for i in range(0,N):
        f = i - A[i]
        t = i + A[i]
        for j in range(max(0, f), min(N, t)):
            B[j] += 1
    
    A = B

for _ in range(0, K):
    proc()

print(" ".join(map(lambda a: str(a), A)))
# Judge status: Accepted
x = int(input())

rest = x

for i in range(1,x+1):
    if i < rest:
        rest -= i
    else:
        print(i)
        break
# Judge status: Accepted
n, k = map(int, input().split())
p = input().split()
for i in range(n):
	p[i] = int(p[i])
p.sort()
a = 0
for i in range(k):
	a += p[i]
print(a)
# Judge status: Accepted
if int("".join(input().split()))%4==0:
  print("YES")
else:
  print("NO")
# Judge status: Wrong Answer
h,w = map(int, input().split())
area = h*w
ans =  (-area) // 2
print(-ans)
# Judge status: Wrong Answer
N = int(input())
S = input()
ans = ''
for i in range(len(S)):
  temp = ord(S[i]) - ord('A')
  ans += chr(ord("A") + temp%26 )
print(ans)
# Judge status: Accepted
import collections
n = int(input())
a = list(map(str,input().split()))
c = collections.Counter(a)
set_a = set(a)
lists = []
for i in set_a:
    if int(c[i]) >= 2:
       lists.append(int(i))
    if int(c[i]) >= 4:
        lists.append(int(i))
lists.sort()
lists.reverse()
if len(lists) > 1:
    ans = int(lists[0]) * int(lists[1])
else:
    ans = 0
print(ans)
# Judge status: Accepted
X,A,B=map(int,input().split())
if A>=B:
    print('delicious')
elif A<B<=X+A:
    print('safe')
else:
    print('dangerous')
# Judge status: Accepted
import math

A, B, H, M = map(int, input().split())

A_degree = (360 / (60 * 12)) * (H * 60 + M)
B_degree = (360 / 60) * M

A_x = A * math.cos(math.radians(A_degree))
A_y = A * math.sin(math.radians(A_degree))

B_x = B * math.cos(math.radians(B_degree))
B_y = B * math.sin(math.radians(B_degree))

ans = math.sqrt((A_x - B_x)**2 + (A_y - B_y)**2)

print(ans)
# Judge status: Accepted
import itertools
n = int(input())

lst = [0] * 10 ** 5
combs = list(itertools.combinations_with_replacement([_ for _ in range(1, 100)], 3))

st = {1:1, 2:3, 3:6}
for _ in combs:
    x, y, z = _[0], _[1], _[2]
    num = x ** 2 + y ** 2 + z ** 2 + (x * y) + (y * z) + (z * x)
    lst[num-1] += st[len(set(_))]

for _ in range(n):
  print(lst[_])
# Judge status: Wrong Answer
a = input()
alpha = ["a", "b", "c", "d", "e", "f", "g",
         "h", "i", "j", "k", "l", "m", "n",
          "o", "p", "q", "r", "s", "t", "u",
        "v", "w", "x", "y", "z"]

for i in range(len(alpha)):
    alphabet = alpha[i]
    if a == alphabet:
        print(alphabet)
        break
# Judge status: Accepted
import itertools
n = int(input())
aa1 = list(map(int, input().split()))
aa2 = list(map(int, input().split()))
aa2.reverse()
aa1 = list(itertools.accumulate(aa1))
aa2 = list(itertools.accumulate(aa2))
aa2.reverse()
ans = 0
for i in range(n):
    tmp = aa1[i] + aa2[i]
    ans = max(ans, tmp)
print(ans)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
L = [list(map(int, input().split())) for i in range(Q)]

a = [0] * (10 ** 5 + 1)
ans = sum(A)

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

for i in range(Q):
    a[L[i][1]] += a[L[i][0]]
    ans += a[L[i][0]] * (L[i][1] - L[i][0])
    print(ans)
# Judge status: Accepted
import heapq

N, M = map(int, input().split())
A = list(map(lambda x: int(x)*(-1), input().split()))
heapq.heapify(A)

for _ in range(M):
    tmp = heapq.heappop(A)
    heapq.heappush(A, tmp/2)

A = map(lambda x: int(x)*(-1), A)

print(sum(A))
# Judge status: Wrong Answer
p=[]
for i in range(int(input())):
    m,n=map(int,input().split())
    p.append([m,n])
g=p
p.sort(key=lambda x:x[0])
d=-99999999
for i in range(1,len(p)):
    d=max(d,abs(p[i][1]-p[i-1][1])+abs(p[i][0]-p[i-1][0]))
p=g
p.sort(key=lambda x:x[1])
d1=-99999999
for i in range(1,len(p)):
    d1=max(d1,abs(p[i][1]-p[i-1][1])+abs(p[i][0]-p[i-1][0]))
print(max(d,d1))
# Judge status: Wrong Answer
n,m = map(int,input().split())
a = []
for i in range(n):
    a.append(list(map(int,input().split())))
a.sort(key= lambda x:x[1])
a = a[::-1]
now = 0
ans = 0
for i in range(m):
    while((m-i) < a[now][0]):
        if now == n-1:
            break
        else:
            now += 1
    if a[now][0] <= (m-i):
        ans += a[now][1]
        now += 1
    if now == n:
        break
print(ans)
# Judge status: Accepted
a,b,x = map(int, input().split())

ans = b//x - (a-1)//x

print(ans)
# Judge status: Accepted
s = input()

v = ['a','i','u','e','o']

if s in v:
  print("vowel")
else:
  print('consonant')
# Judge status: Wrong Answer
n = int(input())
s = input()
ans = 0
x = 0
for i in s:
  if s == 'I':
    x += 1
  else:
    x -= 1
  ans = max(ans,x)
print(ans)
# Judge status: Accepted
n , m = map(int,input().split())
ans = 0
if m >= n*2:
    ans += n
    m -= n*2
    ans += m//4
elif m < n*2:
    ans += m//2
print(ans)
# Judge status: Wrong Answer
n,*p=map(int,open(0).read().split())
cnt=0
for i in range(1,n)[::-1]:
  if p[i-1]<p[i]:
    cnt+=1
print(n-cnt)
# Judge status: Wrong Answer
import sys
input=sys.stdin.readline
n=int(input())
L=list(map(int,input().split()))
L.sort()
num=abs(L[n//2-1]-L[n//2])
print(num if num!=1 else 0)
# Judge status: Wrong Answer
x,y ,z= map(int,input().split())
if x/z >=y:
	print('Yes')
else:
	print('No')