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

n = int(input())
p = list(map(int,input().split()))
cnt = collections.Counter(p)

maxs = []
for k, v in cnt.items():
  if v > 1:
    maxs.append(k)
    
if len(maxs) > 1:
  maxs.sort()
  print(maxs[-1] * maxs[-2])

else:
  print(0)
# Judge status: Wrong Answer
H, N = map(int, input().split())

count = 0
arr = list(map(int, input().split()[:N]))
attack = H

for i in range(N):
    attack = attack - arr[i]
    count = count + 1
    i = i + 1
if attack <= 0 and count > 1:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
a, b, c, d = list(map(int, input().split()))
if (c-a) > d or a == c:
    print("Yes")
elif (b-a) > d and (b-c) > d:
    print("Yes")
elif a == b and b == c:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
x = input()
a = [int(x[i]=='R') for i in range(3)]
s = sum(a)
if(s==2 and a[1]==0):
  s = 1
print(s)
# Judge status: Accepted
n = int(input())
s = input()
ans = 0
w = s.count('.')
b = 0
ans = w+b
for c in s:
    if c=='#':
        b += 1
    else:
        w -= 1
    ans = min(ans, w+b)
print(ans)
# Judge status: Wrong Answer
a, b = map(int, input().split())
if (a + b)%3 == 0:
  print('Possible')
else:
  print('Impossible')
# Judge status: Wrong Answer
n,k = map(int,input().split())
A = [0]*n
B = [0]*n
for i in range(n):
  ta,tb = map(int,input().split())
  A[i] = ta
  B[i] = tb
  
count = k
for i in range(n):
  count -= B[i]
  if count <= 0:
    print(A[i])
    break
# Judge status: Accepted
# coding: utf-8
# Your code here!

N, M = [int(i) for i in input().split()]

cnt = 0
cnt += (N*(N-1))//2
cnt += (M*(M-1))//2
    
print(cnt)
# Judge status: Wrong Answer
from collections import defaultdict
n,m=map(int, input().split())
v = [0]*n
v[0]=1
ans = [1]*n
fi = 1
for i in range(m):
    a,b=map(int, input().split())
    ans[a-1]-=1
    ans[b-1]+=1

    if ans[a-1]==0 and v[a-1]:
        if v[b-1]:fi-=1
        else:v[b-1]=1
    if ans[a-1]>0 and v[a-1]:
        fi+=1
        v[b-1]=1

print(fi)
# Judge status: Accepted
from sys import stdin,stdout
input = stdin.readline
def write(n,sep="\n"):
	stdout.write(str(n))
	stdout.write(sep)
def gil():
	return list(map(int, input().split()))
X, K, D = map(int, input().split())
X = abs(X)
if X >= K * D:
    print(abs(X - K * D))
    exit()
mov = X // D    
if abs(X-mov*D) > abs(X-(mov+1)*D):
    mov += 1
rem = abs(X-mov*D)
mov = K - mov   
mov = mov % 2
print(abs(rem-mov*D))
# Judge status: Accepted
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
x=[]
for i in range(m):
    b,c=map(int,input().split())
    x.append([b,c])
y=sorted(x,key=lambda x:(x[1],x[0]),reverse=True)

d=[]
cnt=0
for i in range(m):
    cnt+=y[i][0]
    d.extend([y[i][1]]*y[i][0])
    if cnt>n:
        break

for i in range(n):
    if len(d)<=i:
        break
    if d[i]>a[i]:
        a[i]=d[i]
    else:
        break
print(sum(a))
# Judge status: Accepted
n=int(input())
a=[int(i) for i in input().split()]
b=sorted(a)
x=sum(b[-1:])
y=sum(b[:-1])
if y>x:
	print('Yes')
else:
	print('No')
# Judge status: Wrong Answer
s=input()
if s.rfind('0')>s.rfind('1'):
  a='0'
else:
  a='1'
s=s.replace('0B','').replace('1B','').replace('B','')
if s=='':
  print(a)
else:
  print(s)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
s=0
b=[]
for i in range(n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            if a[i]!=a[j] and a[j]!=a[k] and a[k]!=a[i] and a[i]+a[j]>a[k] and a[i]+a[k]>a[j] and a[j]+a[k]>a[i]:
                s+=1

print(s)
# Judge status: Wrong Answer
a = input()
b = input()
c = 0
d = 0

for i in a:
    if b[c] == i:
        d = d+1
        c=c+1
    else:
        c=c+1

print(d)
# Judge status: Accepted
K = int(input())
A, B =map(int, input().split())

for i in range(A, B+1):
    if i % K == 0:
        print("OK")
        exit()

print("NG")
# Judge status: Accepted
W, H, x, y = map(int, input().split())

if x == W/2 and y == H/2:
  menseki = W*H/2
  print(menseki,1)
else:
  menseki = W*H/2
  print(menseki,0)
# Judge status: Wrong Answer
p, q, r = map(int, input().split())
print(min(p + q, p + r, r + p))
# Judge status: Accepted
N, K = map(int, input().split(' '))
print(min(N % K, abs((N % K) - K)))
# Judge status: Wrong Answer
n=int(input())
if n!=1 and n%2==0:
  print(0.5)
elif n!=1 and n%2!=0:
  print((n/2+1)/n*2)
else:
  print(1)
# Judge status: Wrong Answer
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')

N = I()
S = input()

ans1 = INF
idx = S.find('#')
if idx >= 0:
    ans1 = S[idx + 1:].count('.')

ans2 = 0
found = False
for c in reversed(S):
    if not found and c == '#':
        continue
    found = True
    if c == '#':
        ans2 += 1

print(min(ans1, ans2))
# Judge status: Accepted
day = input()
if int(day[5:7]) < 5:
  print("Heisei")
else:
  print("TBD")
# Judge status: Accepted
s = str(input())
ans1=0
for i in range(len(s)):
  if(i%2==0 and s[i]!='0'):ans1+=1
  if(i%2==1 and s[i]!='1'):ans1+=1
ans2=0
for i in range(len(s)):
  if(i%2==0 and s[i]!='1'):ans2+=1
  if(i%2==1 and s[i]!='0'):ans2+=1
ans=min(ans1,ans2)
print(ans)
# Judge status: Accepted
N, M = map(int, input().split())
D = [tuple(map(int, input().split())) for _ in range(N)]
D.sort(key=lambda t:t[0])

s = 0
c = 0
for i in range(N):
    s += D[i][1]
    c += D[i][0] * D[i][1]
    if s >= M:
        c -= (s - M) * D[i][0]
        break

print(c)
# Judge status: Accepted
x,y=map(int,input().split())
a=[4,6,9,11]
b=[1,3,5,7,8,10,12]
print('Yes' if (x in a and y in a) or (x in b and y in b) else 'No')
# Judge status: Wrong Answer
n,l= map(int,input().split())
if l == -1:
    count = 0
    for i in range(n):
        count += l
        l += 1
    print(count)
elif l < 0:
    count = 0
    for i in range(n-1):
        count += l
        l += 1
    print(count)
else:
    print(((2*l+n)*(n-1))//2)
# Judge status: Accepted
from collections import Counter
N = int(input())
S = Counter([input() for _ in range(N)])
M = int(input())
T = Counter([input() for _ in range(M)])
ans = 0
for key in S.keys():
    ans = max(S.get(key) - T.get(key, 0), ans)
print(ans)
# Judge status: Wrong Answer
import sys
def main():
    input = sys.stdin.readline
    N, K = map(int, input().split())
    count = 0
    l = []
    
    for _ in range(N):
        a, b = map(int, input().split())
        count += b
        l.append(a)
        
        if count >= K:
            break
    
    l.sort()

    print(l[-1])
if __name__ == "__main__":
    main()
# Judge status: Accepted
x = int(input())

for i in range(400):
    for j in range(i - 800, i):
        if i ** 5 - j ** 5 == x:
            print(i, j)
            exit()
# Judge status: Wrong Answer
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if A < B and A + T * V >= B + T * W:
    print('YES')
else:
    print('NO')
# Judge status: Wrong Answer
from itertools import combinations

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

res = float('inf')
for r in range(N):
    for c in combinations(range(N), r):
        skills = [0] * M
        price = 0
        for i in c:
            price += books[i][0]
            for j, a in enumerate(books[i][1:]):
                skills[j] += a
        if all(skill >= X for skill in skills):
            res = min(res, price)

if res == float('inf'):
    print(-1)
else:
    print(res)
# Judge status: Accepted
import math
a = int(input())
print(a + ( a ** 2) + ( a ** 3))
# Judge status: Wrong Answer
s,t=map(str,input().split())
if s>=t:
  print(t+s)
else:
  print(s+t)
# Judge status: Wrong Answer
w, h, x, y = map(int, input().split())
s = w*h/2

if x == w//2 and y == h//2:
    print(s, 1)
else:
    print(s, 0)
# Judge status: Wrong Answer
A,B,H,M = map(float, raw_input().split())

x = 12.0/360.0*H
y = 60.0/360.0*M

if x < y:
    x,y = y,x

C = (A**2.0+B**2.0)**(0.5)
print C
# Judge status: Accepted
N,M = map(int,input().split())
if N >= 3 and M >= 3:
    print((N-2)*(M-2))
elif N == 2 or M == 2:
    print(0)
else:
    print(max(1,N-2)*max(1,M-2))
# Judge status: Accepted
A = int(input())
B = int(input())

candidates = [1, 2, 3]
candidates.remove(A)
candidates.remove(B)
print(candidates[0])
# Judge status: Accepted
import numpy as np
from numba import jit
N,K=map(int,input().split())
A=list(map(int,input().split()))

@jit
def imos(A):
    B=np.zeros_like(A)
    for i,x in enumerate(A):
        a=max(0,i-x)
        b=min(i+x,N-1)
        B[a]+=1
        if b+1<=N-1:
            B[b+1]-=1
    B=np.cumsum(B)
    return B

for i in range(K):
    if i>=50:
        break
    A=imos(A)
print(*A)
# Judge status: Accepted
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

N,T = MI()

ans = 10000
for i in range(N):
    c,t = MI()
    if t <= T:
        ans = min(ans,c)
print(ans if ans != 10000 else 'TLE')
# Judge status: Wrong Answer
X = list(map(int,input().split()))

N = X[0]
b = X[1]
r = X[2]

if b == 0:
    print(0)
elif r == 0:
    print(N)
elif b + r >= N:
    print(b)
else:
    if N % (r + b) == 0:
        print(b * (N // (r + b)))
    else:
        print(b * (N // (r + b)) + 1)
# Judge status: Accepted
from math import ceil
h = int(input())
w = int(input())
n = int(input())
print(ceil(n/max(h, w)))
# Judge status: Accepted
N, Y = map(int, input().split())

resx, resy, resz = (-1, -1, -1)
xmax = min(N, Y//10000)
for x in range(xmax+1):
    for y in range(N-x+1):
        z = N - x - y
        total = 10000*x + 5000*y + 1000*z

        if total == Y:
            resx, resy, resz = (x, y, z)
            break
        else:
            continue

print(resx, resy, resz)
# Judge status: Accepted
N = int(input())

if N%1000==0:
  print(0)
else:
  print(1000-N%1000)
# Judge status: Accepted
n,l=map(int,input().split())
S=[]
for i in range(n):
  s=input()
  S.append(s)
S.sort()
ans=""
for j in range(n):
  ans+=S[j]
print(ans)
# Judge status: Accepted
n,k=map(int,input().split())
ab=[]
for i in range(n):
    a,b=map(int,input().split())
    ab.append([a,b])
abc=sorted(ab,key=lambda x:x[0])
temp=0
for j in abc:
    temp+=j[1]
    if temp>=k:
        print(j[0])
        exit()
# Judge status: Accepted
n = int(input())
d = sorted(list(map(int, input().split())))
print(d[n // 2] - d[n // 2 - 1])
# Judge status: Accepted
N = int(input())

if N % 9 ==0:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
d,n = map(int,input().split())
if n != 100:
    print(100**d*n)
else:
    print(100**d*101)
# Judge status: Wrong Answer
A ,V = map(int, input().split())
B ,W = map(int, input().split())
T = int(input())

if V <= W:
  print("No")
else:
  if (max(A, B) - min(A, B)) / (V - W) <= T:
    print("Yes")
  else:
    print("No")
# Judge status: Accepted
n=int(input())

print((1000-n%1000)%1000)
# Judge status: Accepted
import re
if re.match("(dream|dreamer|erase|eraser)*$",input()):
  print("YES")
else:
  print("NO")
# Judge status: Accepted
n = int(input())
x = [list(map(int, input().split())) for i in range (n)]

grid = [list([0,0]) for i in range(n)]

for i in range(n):
    grid[i][0] = x[i][0] - x[i][1]
    grid[i][1] = x[i][0] + x[i][1]

new_grid = sorted(grid,key=lambda x:x[1])

cnt = 1
a = new_grid[0][1]

for i in range(n):
    if a <= new_grid[i][0]:
        cnt += 1
        a = new_grid[i][1]
print(cnt)
# Judge status: Accepted
N = int(input())
array = sorted(list(map(int, input().split())),reverse = True)
a = []
for i in range(N):
  a.append(array[i*2+1])
print(sum(a))
# Judge status: Accepted
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [input() for _ in range(n)]

l = int(input())

tmp = l / 3

print(tmp**3)
# Judge status: Accepted
N = int(input())
S = input()

res = ''
for c in S:
    res += chr((ord(c) - ord('A') + N) % 26 + ord('A'))

print(res)
# Judge status: Accepted
n, k = map(int, input().split())
a = list(map(lambda x: int(x) - 1, input().split()))

tel = [[0] * n for _ in range(63)]
tel[0] = a
for i in range(62):
    for j in range(n):
        tel[i + 1][j] = tel[i][tel[i][j]]

now = 0
for i in range(62, -1, -1):
    if k >> i & 1:
        now = tel[i][now]
print(now + 1)
# Judge status: Accepted
n = int(input())
a = [list(map(int, input().split())) for i in range(2)]
s = []
for i in range(n):
  s.append(sum(a[0][:i+1] + a[1][i:]))
print(max(s))
# Judge status: Accepted
S=input()
while len(S)>=5:
    if len(S)>=7 and S[-7:]=="dreamer":
        S=S[:-7]
        continue
    if len(S)>=6 and S[-6:]=="eraser":
        S=S[:-6]
        continue
    elif S[-5:]=="dream" or S[-5:]=="erase":
        S=S[:-5]
        continue
    else:
        break
if len(S)==0:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
n, r = map(int, input().split())

if n < 10:
    print(r + 100 * (10 - n))
else:
    print(r)
# Judge status: Accepted
n,m,x,y=map(int,input().split())
xn=list(map(int,input().split()))
yn=list(map(int,input().split()))
sxn=sorted(xn,reverse=True)
syn=sorted(yn,reverse=True)
if sxn[0]<syn[-1] and sxn[0]<y and x<syn[-1]:
    print("No War")
else :
    print("War")
# Judge status: Accepted
s = input()
s = '0' + s
odd  = ['R','U','D']
even = ['L','U','D']

flag = True

for i in range(1,len(s)):
  if i%2!=0 and s[i] not in odd:#奇数
    flag = False
  if i%2==0 and s[i] not in even:#偶数
    flag = False
    
if flag==True: print('Yes')
else: print('No')
# Judge status: Accepted
a, b, t = map(int, input().split())
print((t // a) * b)
# Judge status: Wrong Answer
a=list(input())
b=list(input())
c=list(input())
turn="a"
while 1:
  if turn=="a":
    turn=a.pop()
    if len(a)==0:print("A");exit()
  elif turn=="b":
    turn=b.pop()
    if len(b)==0:print("B");exit()
  else:
    turn=c.pop()
  if len(c)==0:print("C");exit()
# Judge status: Accepted
s = input()
i = res = 0
tmp = ''
while i < len(s):
  if tmp == s[i]:
    if i == len(s) - 1:
      break
    else:
      tmp = s[i] + s[i+1]
      i += 2
  else:
    tmp = s[i]
    i += 1
  res += 1
print(res)
# Judge status: Wrong Answer
def main():
  M, N, K = map(int, input().split())
  A = list(map(int, input().split()))
  B = list(map(int, input().split()))
  spent_time = 0
  count = 0
  AB = A + B
  AB.sort()
  
  while(True):
    if count == M + N:
      break
    temp = AB[count]
    if spent_time + temp > K:
      break
    spent_time = spent_time + temp
    count += 1
  print(count)
  
main()
# Judge status: Wrong Answer
n,a,*b=open(0).read().split()
s=set(a)
for i in b:
  s^=set(i)
print(len(s))
# Judge status: Wrong Answer
X, Y = map(int, input().split())
if X % Y == 0:
    print(-1)
else:
    print(X * X)
# Judge status: Accepted
def resolve():
    A,B,N = map(int,input().split())
    x = min(N,B-1)
    ans = int(A * x / B) 
    print(ans)
resolve()
# Judge status: Accepted
def main():
    n = int(input())
    flag = 0
    for i in range(1, 10):
        for j in range(1, 10):
            if n == i*j:
                print("Yes")
                flag += 1
                break
        else:
            continue
        break
    if not flag:
        print("No")


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
n = int(input())
a = list()
for x in range(n):
    a.append(int(input()))

sumNum = sum(a)

for x in range(n):
    print(sumNum-x)
# Judge status: Wrong Answer
k, a, b = map(int, input().split())
if k > a+1 and b > a+1:
    x = 1 + k
    t = (k-a+1)//2
    y = t * (b-a) + (k-t*2) + 1
    print(max(x,y))
    exit()
else:
    z = 1 + k
    print(z)
# Judge status: Accepted
e=input
print(int(e())^int(e()))
# Judge status: Accepted
N = int(input())
S = list(input())

W_count = [0]*(N)#左から累積を数えていく
E_count = [0]*(N)#右からｒｙ

for i in range(1,N,1):
    W_count[i]=W_count[i-1]
    if S[i-1]=="W":
        W_count[i]+=1

for i in range(N-2,-1,-1):
    E_count[i]=E_count[i+1]
    if S[i+1]=="E":
        E_count[i]+=1

ans = [0]*(N)
for i in range(0,N,1):
    ans[i]=W_count[i]+E_count[i]

print(min(ans))
# Judge status: Accepted
A,B,N=map(int,input().split())
if N>=B-1:
    x=B-1
else:
    x=N
print(int(A*x/B)-A*int(x/B))
# Judge status: Wrong Answer
from math import *
import sys,bisect,copyreg,copy,statistics,os
def inp(): return sys.stdin.readline().strip()
def IIX(): return (int(x) for x in sys.stdin.readline().split())
def II(): return (int(inp()))
def LI(): return list(map(int, inp().split()))
def LS(): return list(map(str, inp().split()))
def L(x):return list(x)
def out(var): return sys.stdout.write(str(var))

s=L(inp())
con=0

for i in range(3):
    if s[i]=='R':
        con+=1
    if s[i]=='S':
        con=0

out(con)
# Judge status: Accepted
N, K = map(int, input().split())
A = list(map(int, input().split()))
count = 1
N -= K
count += N //(K-1)
if N % (K-1)== 0:
    print(count)
    exit()

print(count+1)
# Judge status: Accepted
def solve():
    N = int(input())
    A = [int(i) for i in input().split()]
    ans = 1
    for i in range(N):
        if ans == -1 and A[i] != 0:
            continue
        ans *= A[i]
        if ans > 10**18:
            ans = -1
    print(ans)

if __name__ == "__main__":
    solve()
# Judge status: Accepted
s = str(input())
a=0
z=0
for i in range(len(s)):
    if s[i]=='A':
        a=i
        break
for i in range(len(s)):
    if s[i]=='Z':
        z=i
print(z-a+1)
# Judge status: Accepted
n = int(input())
a = set(map(int, input().split()))
x = max(a)
z = 10 ** 9
for i in a:
    if abs(i - x / 2) < z:
        y = i
        z = abs(i - x / 2)
print(x, y)
# Judge status: Accepted
N = int(input())
K = int(input())
X = int(input())
Y = int(input())

ans = 0
if N > K:
    ans = (X * K) + (Y * (N - K))
else:
    ans = X * N

print(ans)
# Judge status: Wrong Answer
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

X = int(input())
fac = {}
fac[0] = 0
for i in range(1, 15):
    fac[i] = fac[i-1]+i

for i in range(15):
    f = fac[i]
    if f==X:
        print(i)
        break
    if f>X:
        print((X-fac[i-1])+i-1)
        break
# Judge status: Accepted
S=input()
T=sorted(S)
if S.count(S[0])==2 and S.count(S[2])==2:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
N=int(input())
S = []
for _ in range(N):
    S.append(input())
a=0
b=0
c=0
d=0
for i in S:
  if i=='AC':
    a+=1
  elif i=='WA':
    b+=1
  elif i=='TLE':
    c+=1
  else:
    d+=1
print('AC x '+str(a))
print('WA x '+str(b))
print('TLE x '+str(c))
print('RE x '+str(d))
# Judge status: Accepted
import math

N = float(input())
for i in range(50000):
    if math.floor(i * 1.08) == N:
        print(i)
        exit()
print(':(')
# Judge status: Wrong Answer
a, b = (int(x) for x in input().split())
 
x = (a+b)/2
 
if x % 2 == 0:
  print(int(x))
else:
  print(int(1+(a+b)//2))
# Judge status: Wrong Answer
N  = int(input())
A = list(map(int, input().split()))
status = 0 # 0 = defalt 1 = up 2 = down
cnt = 0
pre = A[0]
for i in range(1,N):
    if pre < A[i]: #up petern
        if status == 0:
            status = 1
        elif status == 2:
            status = 0
            cnt += 1
    elif pre > A[i]:
        if status == 0:
            status = 2
        elif status:
            status = 0
            cnt += 1
    pre = A[i]
print(cnt+1)
# Judge status: Accepted
n,k= map(int,input().split())

if n%k == 0:
    print("0")
else:
    print("1")
# Judge status: Wrong Answer
n,x = map(int,input().split())
a = list(map(int,input().split()))

Slist = sorted(a)
cnt = 0
Sum = 0

for i in range(len(Slist)):
  Sum += Slist[i]
  if x>=Sum:
    cnt +=1
  else:
    break
print(cnt)
# Judge status: Accepted
a,b,c=map(int,input().split())
if a+b+c>=22:
    print("bust")
else:
    print("win")
# Judge status: Accepted
n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
k=sum(a)/(4*m)
s=0
for i in range(m):
    if a[-i-1]>=k:
        pass
    else:
        s=1
        break
if s==1:
    print("No")
else:
    print("Yes")
# Judge status: Accepted
l, r, d = map(int, input().split())

a = []
for i in range(l, r + 1):
    if i % d == 0:
        a.append(i)

print(len(a))
# Judge status: Wrong Answer
N,M = map(int, input().split())

if min(N,M)>1:
  print(N*M-N*2-M*2)
elif max(N,M)==1:
  print(1)
elif min(N,M)==1:
  print(max(N,M)-2)
# Judge status: Accepted
h = int(input())
ans = 0
t = 1
while h > 0:
    h //= 2
    ans += t
    t *= 2
print(ans)
# Judge status: Accepted
nk=list(map(int,input().split()))
d=list(map(int,input().split()))
i=nk[0]
ans=0
while ans==0:
  flag=0
  for j in range(len(str(i))):
    if int(str(i)[j]) in d:
      flag=1
      break
  if flag==0:
    ans=i
  i+=1
print(ans)
# Judge status: Accepted
#!/usr/bin/evn python3

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

A_set = len(set(A))
if N == A_set:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
sorted_list = list(map(int, input().strip().split()))

count = 0
while True:
    sorted_list = sorted(sorted_list, reverse=True)
    if sorted_list[0] == sorted_list[1] and sorted_list[1] == sorted_list[2]:
        break

    count += 1
    if sorted_list[0] > sorted_list[1]:
        sorted_list[1] += 1
        sorted_list[2] += 1
    else:
        sorted_list[2] += 2


print(count)
# Judge status: Accepted
N, C, K = list(map(int, input().split()))
T = [int(input()) for _ in range(N)]

T.sort()

ans = 1
cnt = 1
t = T[0]

for i in range(1, N):
  if T[i] - t > K or cnt >= C:
    ans += 1
    cnt = 1
    t = T[i]
  else:
    cnt += 1

print(ans)
# Judge status: Accepted
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if a == b:
  print("YES")
elif a < b:
  a_new = a + v * t
  b_new = b + w * t
  if a_new >= b_new:
    print("YES")
  else:
    print("NO")
else:
  a_new = a - v * t
  b_new = b - w * t
  if a_new <= b_new:
    print("YES")
  else:
    print("NO")
# Judge status: Wrong Answer
n = int(input())
print(n*(n+1)/2)
# Judge status: Accepted
from math import sqrt
n,d = map(int,input().split())
x = [list(map(int,input().split())) for i in range(n)]
ans = 0
for i in range(n):
    for j in range(i+1,n):
        t = 0
        for k in range(d):
            t += (x[i][k] - x[j][k]) ** 2
        if float.is_integer(sqrt(t)):
            ans += 1
print(ans)
# Judge status: Accepted
sx,sy,tx,ty=map(int,input().split())
x1,y1=tx-sx,ty-sy
x2,y2=x1+2,y1+2

s="U"*y1
s+="R"*x1
s+="D"*y1
s+="L"*x1

s+="L"
s+="U"*(y2-1)
s+="R"*(x2-1)
s+="D"

s+="R"
s+="D"*(y2-1)
s+="L"*(x2-1)
s+="U"

print(s)
# Judge status: Accepted
N = int(input())
M = 10**9 + 7

if N < 3:
    print(0)
elif N < 6:
    print(1)
else:
    dp = [0] * (N + 1)

    dp[3] = 1
    dp[4] = 1
    dp[5] = 1
    for i in range(6, N + 1):
        dp[i] = sum(dp[3:i - 3 + 1]) + 1
        dp[i] %= M

    print(dp[-1] % M)
# Judge status: Accepted
N = int(input())
S = input()
T = S[0:N//2]
print("Yes" if S == T + T else "No")
# Judge status: Accepted
N = int(input())
c = [0]*(N-1)
s = [0]*(N-1)
f = [0]*(N-1)
for i in range(N-1):
    c[i],s[i],f[i] = list(map(int,(input().split())))
for i in range(N):
    time = 0
    for j in range(i,N-1):
        if time < s[j]:
            time = s[j]
        time += (-time) % f[j]
        time += c[j]
    print(time)
# Judge status: Wrong Answer
S = input()
Q = int(input())
reverse = False
front = ""
end = ""

for i in range(Q):
    inp = input()
    if inp[0] == "1":
        reverse = ~reverse
    else:
        _, F, C = inp.split()
        if (F == "1") ^ reverse:
            front =front+C
        else:
            end =end+C

if reverse:
    print(end[::-1]+S[::-1]+front)
else:
    print(front[::-1]+S+end)
# Judge status: Accepted
N = int(input())
temp_min = sum(map(int, str(1))) + sum(map(int, str(N - 1)))
for A in range (2, N):
    x = sum(map(int, str(A))) + sum(map(int, str(N - A)))
    if x < temp_min:
        temp_min = x
print(temp_min)
# Judge status: Wrong Answer
n = int(input())
ans = 0
for i in range(1, n+1):
    count = 0
    for j in (1, i+1):
        if i % j == 0:
            count += 1
            
    ans = i * count
print(ans)