peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
L = []
L.append(list(map(int, input().split())))
L.append(list(map(int, input().split())))
L.append(list(map(int, input().split())))
L.append([L[0][0], L[1][0], L[2][0]])
L.append([L[0][1], L[1][1], L[2][1]])
L.append([L[0][2], L[1][2], L[2][2]])
L.append([L[0][0], L[1][1], L[2][2]])
L.append([L[0][2], L[1][1], L[2][0]])
N = int(input())
B = [int(input()) for i in range(N)]
if any(B >= l for l in L):
  print("Yes")
else:
  print("No")
# Judge status: Accepted
def dist(x, y):
    return ((x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2) ** .5

N = int(input())
lst = []
for _ in range(N):
    lst.append([int(x) for x in input().split()])

d = 0
for i in range(N - 1):
    for j in range(i + 1, N):
        d += dist(lst[i], lst[j])

print(d * 2 / N)
# Judge status: Accepted
n = str(input())
cnt = 0
for i in n:
    if i == "9":
       cnt += 1
if cnt >= 1:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
N = int(input())
A = [int(x) for x in input().split()]
Q = int(input())
ans = []
for x in range(Q):
    B, C = [int(x) for x in input().split()]
    A = [x if x != B else C for x in A]
    ans.append(sum(A))
print(ans)
# Judge status: Wrong Answer
N = int(input())
P = list(map(int, input().split()))
n = N
for i in range(1,N):
  if P[i] != min(P[0:i+1]):
    print(P[0:i+1])
    print(P[i])
    n -= 1
  else:
    pass
print(n)
# Judge status: Wrong Answer
n = int(input())

dic = []
cnt = 0

for i in range(n):
  word = sorted(list(input()))
  word = ''.join(word)
  if word in dic:
    cnt += 1
  else:
    dic.append(word)

print(cnt)
# Judge status: Accepted
N=int(input())
P=[]
for i in range(N):
	P.append(list(map(int,input().split())))
D=0
for i in range(N-1):
	for j in range(i+1,N):
		D+=(((P[i][0]-P[j][0])**2+(P[i][1]-P[j][1])**2)**(1/2))
print((D*2/N))
# Judge status: Wrong Answer
n = int(input())
d_inputs = sorted([int(i) for i in input().split()])

abc = d_inputs[0:n//2]
arc = d_inputs[n//2:n]
print(abc,arc)
print(len([i for i in range(abc[-1]+1,arc[0]+1)]))
# Judge status: Accepted
x = input()
stack = []
for s in x:
    if s == 'S':
        stack.append(s)
    else:
        if not stack:
            stack.append(s)
        elif stack[-1] == 'S':
            stack.pop()
        else:
            stack.append(s)
print(len(stack))
# Judge status: Wrong Answer
n, m = map(int, input().split())

if n == 1 and m == 1:
  print(0)
elif n == 1:
  print(m-2)
elif m == 1:
  print(n-2)
else:
  print((n-2)*(m-2))
# Judge status: Wrong Answer
N, K = map(int, input().split())

ans = []
for _ in range(N):
    a, b = map(int, input().split())
    ans += [a] * b
print(ans[K-1])
# Judge status: Wrong Answer
A, B = map(int, input().split())

ans = 0
for i in range(A, B+1):
    a = str(i)
    l = len(a)
    if l % 2 == 1:
        if a[:l//2] == a[l//2+1:]:
            ans += 1

print(ans)
# Judge status: Wrong Answer
s=input();print(min(abs(int(s[i:i+3])-753)for i in range(len(s)-3)))
# Judge status: Wrong Answer
N, M = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(N)]
a.sort(key = lambda x:x[1])
day = M
ans = 0
for i in range(N):
    if a[N - 1 - i][0] <= day:
        ans += a[N - 1 - i][1]
        day -= 1
print(ans)
# Judge status: Accepted
N, M = map(int, input().split())
A = [input() for _ in range(N)]
B = [input() for _ in range(M)]

for i in range(0, N-M+1):
    pos = A[i].find(B[0])
    if pos >= 0:
        for j in range(1, M):
            if A[i+j][pos:pos+M] != B[j]:
                break
        else:
            print('Yes')
            break
else:
    print('No')
# Judge status: Wrong Answer
n,x,y=map(int,input().split())
def dis(i,j):
  return min(j-i,abs(j-y)+abs(i-x)+1)-1
ans=[0]*(n-1)
for i in range(0,n-1):
  for j in range(i,n):
    ans[dis(i,j)]+=1
for i in range(len(ans)):
  print(ans[i])
# Judge status: Wrong Answer
x=int(input())
cost=100
cnt=0
while cost<=x:
    cost=(cost*1.01)//1
    cnt+=1

print(cnt)
# Judge status: Accepted
n = int(input())
s = list(input())
ans = 0
for i in range(1, n - 1):
    l = set(s[:i])
    r = set(s[i:])
    ans = max(ans, len(l & r))
print(ans)
# Judge status: Accepted
N, A, B = map(int, input().split())
M = N // (A + B)

print(A * M + min(N - M * (A + B), A))
# Judge status: Accepted
n,k = map(int,input().split())


if n > k:
    n = n%k
    ans = min(k-n,n)  
else:
    ans = min(k-n,n)

print(ans)
# Judge status: Accepted
s = input()
ans = ""
for i in range(len(s)):
    ans+="x"
print(ans)
# Judge status: Accepted
mod = 1000000007
def choose(n, a):
    x = 1
    y = 1
    if n/2 < a:
        a = n - a
    for i in range(a):
        x *= n - i
        if x > mod:
            x %= mod
        y *= a - i
        if y > mod:
            y %= mod
    val = x * pow(y, mod-2, mod) % mod
    return val

n, a, b = map(int, input().split(" "))

ans = int(pow(2, n, mod) - 1 - choose(n, a) - choose(n, b))
print(ans % mod)
# Judge status: Accepted
# -*- coding: utf-8 -*-
import numpy as np
def fnSolv():
  iK, iX = map(int , input().split() )
  if 500 * iK >= iX:
    print('Yes')
  else:
    print('No')

if __name__ == '__main__':
  fnSolv()
# Judge status: Wrong Answer
N = int(input())
a = [int(i) for i in input().split()]
n = 0
for i in a:
    n ^= i
print(n)
b = 1
ans = [0]*N
for _ in range(30):
    for i,v in enumerate(a):
        ans[i] += (v & b) ^ (n & b)
    b <<= 1
print(*ans)
# Judge status: Wrong Answer
N,A,B = map(int,input().split())
if A > B:
    print(0)
if N == 1:
    if A != B:
        print(0)
    else:
        print(1)
else:
    print((B*(N-1)+A)-(A*(N-1)+B)+1)
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))
L = [0]*8
tourist = int()
for a in A:
    n = a//400
    if n > 7:
        tourist += 1
    else:
        L[n] = 1

cnt = int()
for l in L:
    if l == 1:
        cnt += 1

if cnt==0:
    print(1,tourist)
else:
    print(cnt, cnt+tourist)
# Judge status: Accepted
 
list = input().split()
 
m1 = int(list[0])*60 + int(list[1])
m2 = int(list[2])*60 + int(list[3])
#print(m1,m2)
    
ans = m2 - m1
print(ans-int(list[4]))
# Judge status: Accepted
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def main():
    N = int(readline())
    A = [0] + [int(i) for i in readline().split()]
    table = [0 for _ in range(N+1)]
    for i in range(N, 0, -1):
        table[i] = (sum(table[::i])%2)^A[i]

    print(sum(table))
    for i in range(N):
        if table[i+1]:
            print(i+1, end=' ')
if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
N, K, Q = map(int, input().split())
A = [int(input().rstrip()) for i in range(Q)]
#print(A)
score =[0]*(N)


for i in range(Q):
    score[A[i]-1] += 1
#print(score)

for i in range(N):
    if K+score[i]-Q >0:
        print('yes')
    else:
        print('No')
# Judge status: Accepted
s=input()
t="keyence"
if s==t:print("YES");exit()
n=len(s)
for i in range(n):
  for j in range(i,n):
    if s[:i]+s[j+1:]==t:print("YES");exit()
print("NO")
# Judge status: Wrong Answer
# 初期入力
r = int(input())
mennseki_r =3.14*r*r
mennseki_1 =3.14*1*1

kotae =int(mennseki_r / mennseki_1)
print(kotae)
# Judge status: Wrong Answer
a,b = map(int, input().split())

if a>0 and b>0:
    print('Positive')
elif a<0:
    if b<0 and a%2==0:
        print('Positive')
    elif b<0 and a%2==1:
        print('Negative')
    elif b>0:
        print('Zero')
# Judge status: Accepted
# https://atcoder.jp/contests/agc003/tasks/agc003_a
S = str(input())
n,w,e,s = 'N' in S, 'W' in S, 'E' in S, 'S' in S
print('Yes' if n == s and e == w else 'No')
# Judge status: Accepted
N = int(input())
C = -1
while N:
    N //= 2;
    C += 1
print(1 << C)
# Judge status: Accepted
# coding = SJIS
a, b = map(int, input().split())
ans = 0
if a <= b:
    ans += b
    b -= 1
    ans += max(a, b)
else:
    ans += a
    a -= 1
    ans += max(a, b)
print(ans)
# Judge status: Accepted
# coding: utf-8
import sys

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

N = ir()
A = lr()
remain = sum(A)
depth = 0
end = 1  # 現時点の深さの頂点の最大値
answer = 0
for i, a in enumerate(A):
    answer += end
    if end < a:
        print(-1); exit()
    end -= a
    remain -= a
    end *= 2
    end = min(remain, end)

print(answer)
# Judge status: Wrong Answer
N=int(input(" "))
Y=N%100
M=N//100
if M>11:
    print("YYMM")
elif Y>11:
    print("MMYY")
elif M<13:
    print("AMBIGUOUS")
elif M==0 or Y==0:
    print("NA")
# Judge status: Accepted
A = list(map(int,input().split()))
print(A[0]*A[1]//2)
# Judge status: Accepted
n = int(input())
A = list(map(int,input().split()))
L = {}
R = {}
ans = 0
for i,j in enumerate(A):
    if i+j in L:
        L[i+j] += 1
    else:
        L[i+j] = 1
    if i-j in R:
        R[i-j] += 1
    else:
        R[i-j] = 1
for i,j in L.items():
    if i in R:
        ans += j*R[i]
print(ans)
# Judge status: Accepted
N, Q = map(int, input().split())
S = " " + input()
lr = [list(map(int, input().split())) for _ in range(Q)]
ans = [0 for _ in range(N+10)]

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

for l, r in lr:
    print(ans[r] - ans[l])
# Judge status: Accepted
def main():
	n = list(str(input()))
	n_s = sorted(n)
	if n_s[0] == n_s[1] and n_s[2] == n_s[3] and n_s[1] != n_s[2]:
		print("Yes")
	else:
		print("No")

 
if __name__ == '__main__':
	main()
# Judge status: Accepted
import collections

n = int(input())

data = []
for _ in range(n):
  data.append( input() )

c = collections.Counter(data)
# print(c)
# Counter({'a': 4, 'c': 2, 'b': 1})

print(len(list(c)))
# Judge status: Accepted
# A
s = input()
count = 0
ans = 0
for i in range(len(s)):
    if s[i] == "R":
        count += 1
    else:
        if ans < count:
            ans = count
        count = 0
if ans < count:
    ans = count
print(ans)
# Judge status: Accepted
from collections import Counter
def solve():
    ans = 0
    N = int(input())
    A = list(map(int, input().split()))
    C = Counter(A)
    D = [[0,0],[0,0]]
    for k,v in C.items():
        if v>=2:
            D.append([k,v])
    D.sort(reverse=True)
    if D[0][1]>=4:
        return D[0][0]**2
    return D[0][0]*D[1][0]
print(solve())
# Judge status: Wrong Answer
n = list(map(int, input().split()))
if 9 in n:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
import itertools
n,m,x=map(int, input().split())
a = [list(map(int, input().split())) for l in range(n)]
bit=list(itertools.product([0,1],repeat=n))
M=10**7
for i in range(2**n):
  cnt1=[0]*m
  cnt2=0
  for j in range(n):
    if bit[i][j]==1:
      cnt2+=a[j][0]
      for k in range(m):
        cnt1[k]+=a[j][k+1]
  ans=True
  for j in range(m):
    if cnt1[j]<x:
      ans=False
  if ans:
    M=min(cnt2,M)
if M==10**7:
  print(-1)
else:
  print(M)
# Judge status: Wrong Answer
n, T = map(int, input().split())
c = [0 for _ in range(n)]
t = [0 for _ in range(n)]
for i in range(n):
    c[i], t[i] = map(int, input().split())

ans = 1000

for i in range(n):
    if t[i] <= T:
        ans = min(ans, c[i])
print(ans if ans != 1000 else "TLE")
# Judge status: Wrong Answer
s=list(input())
a=0
z=0

print(len(s))

for i in range(len(s)):
  if s[i]=="A":
      a=i
      break

print(a)

S=list(reversed(s))
for j in range(len(S)):
    if S[j]=="Z":
        z=j
        break
print(z)

print(len(s)-a-z)
# Judge status: Accepted
Slist=input()
Slist=Slist.replace("><",">,<").split(",")
ans=0
for S in Slist:
    a=S.count("<")
    b=S.count(">")
    n=max(a,b)
    m=len(S)-n
    ans=ans+n*(n+1)//2+(m-1)*m//2
print(ans)
# Judge status: Accepted
w, h, n = map(int, input().split())
T = [list(map(int, input().split())) for i in range(n)]

xr = w
xl = 0
yu = h
yl = 0

for i in range(n):
    if T[i][2] == 2:
        xr = min(xr, T[i][0])
    elif T[i][2] == 1:
        xl = max(xl, T[i][0])
    elif T[i][2] == 4:
        yu = min(yu, T[i][1])
    else:
        yl = max(yl, T[i][1])

if (xr - xl) <= 0 or (yu - yl) <= 0:
    print(0)
else:
    print((xr - xl) * (yu - yl))
# Judge status: Wrong Answer
N = int(input())


def base10to(n, b):
    if n // b:
        return base10to(n // b - 1, b) + ',' + str(n % b)
    return str(n % b)

res_26 = base10to(N - 1, 26)
print(res_26)

res = []
for s in res_26.split(','):
    res.append(chr(97 + int(s)))

print(''.join(res))
# Judge status: Accepted
N=int(input())
*A,=map(int,input().split())
*B,=map(int,input().split())

ca=cb=0
for a,b in zip(A,B):
    ca+=max(0,(b-a)//2)
    cb+=max(0,a-b)

print('YNeos'[ca<cb::2])
# Judge status: Wrong Answer
s = list(input())
k = int(input())

if set(s[:k+1]) == set([1]):
    print(1)
else:
    for x in s[:k+1]:
        if x != '1':
            print(x)
            break
# Judge status: Accepted
N = int(input())

iMax = N - 1

ans = 0
for a in range(1, N):
  ans += iMax // a

print(ans)
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
dp=[[0,0]for _ in range(n)]
dp[0]=[a[0],-a[0]]
for i in range(1,n):
  dp[i][0]=max(dp[i-1][0]+a[i],dp[i-1][1]-a[i])
  dp[i][1]=max(dp[i-1][0]-a[i],dp[i-1][1]+a[i])
for i in dp:print(i)
print(dp[n-1][0])
# Judge status: Accepted
s=input()
S=[s[i] for i in range(len(s))]
characters=[0 for i in range(97,123)]
len(characters)
for i in range(len(S)):
  characters[ord(S[i])-97]=characters[ord(S[i])-97]+1
if 0 in characters:
  print(chr(characters.index(0)+97))
else:
  print('None')
# Judge status: Wrong Answer
import numpy as np
n, k = map(int, input().split())
an = list(map(int, input().split()))

p_sekiwa = np.prod(an[0:k])
# print(p_sekiwa)
for i in range(k,len(an)):
    sekiwa = np.prod(an[i-k+1: i+1])
    #print(sekiwa)
    if sekiwa>p_sekiwa:
        print('Yes')
    else:
        print('No')
    p_sekiwa = sekiwa
# Judge status: Accepted
N=int(input())
a=[]
b=0
for i in range(N):
	a.append(input())
d={}
sor={}
for i in range(N):
    if a[i] in d.keys():
        d[a[i]]+=1
    else:
        d.setdefault(a[i],1)
        b+=1
sod = sorted(d.keys())
#max=sod["a[0]"]
maxval=0
for i in range(N):
    if maxval<=d[a[i]]:
        maxval=d[a[i]]
for i in range(b):
    if maxval==d[sod[i]]:
        print(sod[i])
# Judge status: Wrong Answer
x,y=map(int,input().split())
ans=0
ans=max(ans,x+x-1)
ans=max(ans,x+y)
ans=max(ans,x+y-1)
print(ans)
# Judge status: Accepted
a,b,c,d,e = map(int, input().split())
print(15-a-b-c-d-e)
# Judge status: Wrong Answer
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

a = abs(B-A)
v = V-W
v2 = v*T

if(a<=v2):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
s=input()
if s=='ABC':
    print('ARC')
else:
    print('ABC')
# Judge status: Accepted
S = input()

if S <= "2019/04/30":
    print("Heisei")
else:
    print("TBD")
# Judge status: Wrong Answer
N = int(input())
An = list(map(int, input().split()))
print(sum(An) - min(An))
# Judge status: Wrong Answer
n = int(input()) # 入力が1つ
t, a = map(int, input().split()) # 入力が複数
h = [int(i) for i in input().split()] # 配列で数字

ans = 0
nearest = abs(h[0] * 0.006 - a)
for i in range(n):
    temp = abs(h[i] * 0.006 - a)
    if temp < nearest:
        nearest = temp
        ans = i
print(ans + 1)
# Judge status: Accepted
N = int(input())
ans = 0
for j in range(1, N + 1):
    m = (N // j)
    ans += m * (1 + m) * j // 2
print(ans)
# Judge status: Accepted
a, b, c = map(int, input().split())
print('YES' if b - a == c -b else 'NO')
# Judge status: Wrong Answer
import itertools
n,k = map(int,input().split())
unlike = list(map(int,input().split()))
like = []
for i in range(0,10):
    if not(i in unlike):
        like.append(i)
if unlike == [0]:
    print(n)
    exit()
i = 1
ans = 0
while(i < 99):
    current = list(itertools.product(like,repeat=i))
    for j in range(len(current)):
        h = int("".join(map(str,(list(current[j])))))
        if n < h:
            print(h)
            exit()
    i += 1
# Judge status: Accepted
h, n = map(int, (input().split()))
lst = [list(map(int, input().split())) for i in range(n)]

dp = [float('inf')] * ((10 ** 5) + 1)
dp[0] = 0

for i in range(n):
    for j in range(1, h+1):
        if j - lst[i][0] < 0:
            dp[j] = min(dp[0] + lst[i][1], dp[j])
        else:
            dp[j] = min(dp[j - lst[i][0]] + lst[i][1], dp[j])

print(dp[h])
# Judge status: Accepted
def Digits(N, K):
  if not N:
    return 1
  digits = 0
  while N:
    N = N // K
    digits += 1
  return digits
 
N, K = map(int, input().split())
print (Digits(N, K))
# Judge status: Wrong Answer
import sys

numbers = sys.stdin.readline().split(' ')

a = int(numbers[0])
b = int(numbers[1])
c = int(numbers[2])


if a > 0:
    print(b/c - (a-1)/c)
else:
    print(b/c)
# Judge status: Wrong Answer
l,r = map(int,input().split())

l %= 2019
r %= 2019

mina = float('INF')

for x in range(l,r+1):
    for y in range(x,r+1):
        if(x==y):
            continue
        ans = (x * y) % 2019
        if(mina > ans):
            mina = ans
        
print(mina)
# Judge status: Accepted
s,t=0,0
X=list(input())
for i in range(len(X)):
  if X[i]=="S":
    s=s+1
  else:
    if s>0:
      s=s-1
    else:
      t=t+1
print(s+t)
# Judge status: Accepted
n=int(input())
for i in range(n+1):
  if i*(i+1)//2>=n:break
ans=[]
for j in range(i,0,-1):
  if j<=n:
    n-=j
    ans+=[j]
print(*ans,sep='\n')
# Judge status: Accepted
a, b, c = map(int, input().split())

max_num = max(a,b,c)

if max_num*3 % 2 == (a+b+c) % 2:
    print((max_num*3-(a+b+c))//2)
else:
    print(((max_num+1)*3-(a+b+c))//2)
# Judge status: Wrong Answer
N = int(input())
A = input().split()
x = 0
def even(x):
  for i in A:
    if A[i]%2 != 0:
      break
    else:
      x+=1
  return x

if x == N:
  print(min(A)/2 -1)
else:
  print(x)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

one = 0
two = 0
four = 0
for i in a:
  if i%4 == 0: four += 1
  elif i%2 == 0: two += 1
  else: one += 1

if four-one-two%2 >= -1: print("Yes")
else: print("No")
# Judge status: Accepted
N = int(input())
A = [int(_) for _ in input().split()]
B = [int(_) for _ in input().split()]

v = 0
for a, b in zip(A, B):
    if b - a > 0:
        v += (b - a) // 2
    else:
        v += b - a
if v >= 0:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
a, b, c, x, y = map(int,input().split())

ans = 10**18

for i in range(100100):
    ans = min(ans, 2*c*i + max(0, x-i)*a + max(0,y-i)*b)
        
print(ans)
# Judge status: Accepted
n, m = map(int, input().split())
print((n*(n-1)+m*(m-1))//2)
# Judge status: Wrong Answer
N = int(input())
A = [list(map(int, input().split())) for _ in range(N)]
tail = 0
head = float('inf')
for i in range(N):
    tail = max(tail, sum(A[i]))
    head = min(head, sum(A[i]))

ans = tail - head
print(ans)
# Judge status: Accepted
a,b = map(int,input().split())
if a * b % 2 == 0:
    print ("Even")
else:
    print("Odd")
# Judge status: Accepted
N=int(input())
a=list(map(int,input().split()))
y=sum(a)
x=0
B=[]
for i in range(N-1):
    x+=a[i]
    y-=a[i]
    B.append(abs(x-y))

print(min(B))
# Judge status: Accepted
def main():
    N, K = map(int, input().split())
    ans = 0
    while N > 0:
        N //= K
        ans += 1
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Accepted
h1, m1, h2, m2, k = map(int, input().split())

print(60 - m1 + (h2 - h1 - 1) * 60 + m2 - k)
# Judge status: Accepted
S = input()
ans = [0]*(len(S)+1)

for i in range(len(S)):
    if S[i] == "<":
        ans[i+1] = max(ans[i+1], ans[i]+1)

for i in range(len(S)-1, -1, -1):
    if S[i] == ">":
        ans[i] = max(ans[i], ans[i+1]+1)
print(sum(ans))
# Judge status: Accepted
x = list(input())
n = len(x)
ct = 0
cs = 0
c = 0
for X in x:
    if X == "S":
        cs += 1
    else:
        ct += 1
        if cs >= 1:
            cs -= 1
            c += 1
print(n-2*c)
# Judge status: Wrong Answer
a,b,c = map(int,input().split())
if b > a:
    z = a
    a = b
    b = z
if a <= c <= b:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
import math

# 0924 start
inputted = list(map(int, input().split()))
N = inputted[0]
D = inputted[1]

X = []
for i in range(N):
    print(i)
    X.append(list(map(int, input().split())))
print(X)

calculate = lambda y, z : math.sqrt(sum([(yi - zi) ** 2 for yi, zi in zip(y, z)]))

answer = 0
for i in range(N):
    for j in range(N):
        if i >= j: continue

        distance = calculate(X[i], X[j])
        if distance.is_integer(): answer += 1

print(answer)
# Judge status: Accepted
import math
S = int(input())
 
x1 = math.ceil(math.sqrt(S))
y1 = 1
x2 = x1 ** 2 - S
y2 = x1
x3 = 0
y3 = 0
 
print(x1, y1, x2, y2, x3, y3)
# Judge status: Accepted
#最長増加部分列問題 (LIS) 
import bisect

N = int(input())
seq = [0] * N
for i in range(N):
  seq[i] = int(input())

LIS = [-1] * N
LIS[-1] = seq[0]
#print(LIS)
for i in range(1, len(seq)):
    LIS[bisect.bisect_left(LIS, seq[i]) - 1] = seq[i]
    #print(LIS)
#print(LIS)
c = LIS.count(-1)
print(len(LIS) - c)
# Judge status: Accepted
n,k=map(int,input().split())
a=list(map(int,input().split()))

for _ in range(min(k,100)):
    s=[0 for _ in range(n)]
    e=[0 for _ in range(n)]
    for i in range(n):
        d=a[i]
        s[max(0,i-d)]+=1
        e[min(n-1,i+d)]+=1
    a[0]=s[0]
    for i in range(1,n):
        s[i]=s[i-1]+s[i]
        e[i]=e[i-1]+e[i]
        a[i]=s[i]-e[i-1]

print(*a)
# Judge status: Accepted
a = list(map(int,input().split()))
print(min((a[1]//a[0]),a[2]))
# Judge status: Accepted
A,B,C = map(int,input().split())
for i in range(1,B+1):
    if A*i %B == C :
        print('YES')
        break
else:
    print('NO')
# Judge status: Accepted
s = int(input())
a = [s]
for i in range(1000000):
    if a[i] % 2 == 0:
        x = a[i] // 2
    else:
        x = 3 * a[i] + 1
    if x in a:
        print(i + 2)
        exit()
    else:
        a.append(x)
# Judge status: Wrong Answer
n,m=map(int,input().split())
if n>=2: print((n-2)*(m-2))
elif n==1 and m==1: print(1)
else: print(max(n,m)-2)
# Judge status: Accepted
import numpy as np

A, B, C, K = map(int, input().split(" "))
vec = np.array([[A], [B], [C]])
mat = np.array([[0, 1, 1], [1, 0, 1], [1, 1, 0]])
mat = np.linalg.matrix_power(mat, K)
ans = mat.dot(vec)

if abs(ans[0] - ans[1]) <= 10e18:
    print(int(ans[0] - ans[1]))
else:
    print('Unfair')
# Judge status: Accepted
N, M = map(int, input().split())
AB = [[int(x) for x in input().split()] for _ in range(N)]

AB = sorted(AB)
ans = 0
for a, b in AB:
    if M==0:
        break
    elif M > b:
        M -= b
        ans += a * b
    else:
        ans += a * M
        break
print(ans)
# Judge status: Accepted
X,Y = map(int,input().split())
ans = 1
x = X

for n in range(Y):
  if x*2<=Y:
    ans+=1
    x*=2
  else:
    print(ans)
    exit()
# Judge status: Wrong Answer
N,M,Q=map(int,input().split())
point=0
while Q>0:
  a,b,c,d=map(int,input().split())
  l=b-a+M-N
  s=b-a
  if c>=s and c<=l:
    point=point+d
  Q=Q-1
print(point)
# Judge status: Accepted
s = input()
print(s.replace('?','D'))
# Judge status: Wrong Answer
"""
int(input())
map(int, input().split())
list(map(int, input().split()))
input()
input().split()
"""


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

ans = 0

for i in range(1,n+1):
    tmp = a.count(i)
    if (tmp-i > 0):
        ans += tmp-i
    elif tmp-i < 0:
        ans += tmp

print(ans)
# Judge status: Wrong Answer
import collections

N = int(input())
S = input()

m = 0
index = 0
for i in range(N):
    a = set(S[:i])
    b = set(S[i:])
    #print(a)
    #print(b)
    d = 0
    for c in a:
        if c in b:
            d += 1
    if d > m:
        m = d
        index = i
print(index - 1)
# Judge status: Accepted
n,m,*a=map(int,open(0).read().split())
dp=[0]*(n+1)
b=[1]*(n+1)
for i in a:
    b[i]=0
dp[0]=1
if b[1]:
    dp[1]=1
for i in range(2,n+1):
    if b[i]:
        dp[i]=dp[i-1]+dp[i-2]
print(dp[-1]%(10**9+7))
# Judge status: Accepted
S = input()
ans = 0
for i in range(len(S)):
  if S[i] != S[::-1][i]:
    ans += 1
print(ans // 2)
# Judge status: Wrong Answer
import collections
import functools
import math

n = int(input())
l = list(map(int, input().split(" ")))
c = collections.Counter(l)

def f(n , r):
    if (n < r):
        return 0
    return math.factorial(n) // (math.factorial(n-r) * math.factorial(r))

total = functools.reduce(lambda x, y : x + f(y, 2), c.values())

for i in l:
    print(total - f(c.get(i, 0), 2) + f(c.get(i, 0) - 1 , 2))