Harryxun/stf_run huggingface dataset:
import numpy as np

S      = input()
S      = S.split()
N      = int(S[0])
D      = int(S[1])
matrix = np.zeros([N, D])
count  = 0


for i in range(0, N, 1):
    X_vector = input()
    X_vector = X_vector.split()
    for j in range(0, D, 1):
        matrix[i][j] = int(X_vector[j])

for i in range(0, N, 1):
    a_vector = matrix[i]
    for j in range(i+1, N, 1):
        b_vector = matrix[j]
        length = np.linalg.norm(b_vector-a_vector)
        if length.is_integer()):
            count = count + 1
print(count)


### FIXED CODE ###

import numpy as np

S      = input()
S      = S.split()
N      = int(S[0])
D      = int(S[1])
matrix = np.zeros([N, D])
count  = 0


for i in range(0, N, 1):
    X_vector = input()
    X_vector = X_vector.split()
    for j in range(0, D, 1):
        matrix[i][j] = int(X_vector[j])

for i in range(0, N, 1):
    a_vector = matrix[i]
    for j in range(i+1, N, 1):
        b_vector = matrix[j]
        length = np.linalg.norm(b_vector-a_vector)
        if length.is_integer():
            count = count + 1
print(count)
A = input()
if A[0] != A[2] == A[4] or A[2] != A[4] == A[0] or A[4] != A[0] == A[2]:
    input('Yes')
else:
    input('No')

### FIXED CODE ###

A = input()
if A[0] != A[2] == A[4] or A[2] != A[4] == A[0] or A[4] != A[0] == A[2]:
    print('Yes')
else:
    print('No')
n = int(input())
a = list(map(int, input()))

out = [0]*n

for aa in a:
  out[a] += 1

for o in range(len(out)):
  print(o)

### FIXED CODE ###

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

out = [0]*n

for aa in a:
  out[aa-1] += 1

for i in range(len(out)):
  print(out[i])
import fractions
n,m = map(int,input().split())
l = input().split()
lcm = 1
for i in range(len(l) -1):
    lcm = (int(l[i]) * lcm) // fractions.gcd(int(l[i]), lcm)
x = m // (int(lcm)/2)
y = m // lcm
print(int(x-y))

### FIXED CODE ###

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
 
def div_ceil(x, y): return (x + y - 1) // y
 
N, M = map(int, input().split())
*A, = map(int, input().split())
A = list(set([a // 2 for a in A]))
L = A[0]
for a in A[1:]:
    L *= a // gcd(L, a)
for a in A:
    if (L // a) % 2 == 0:
        ans = 0
        break
else:
    ans = div_ceil(M // L, 2)
print(ans)
input();print('YNEOS'[eval(input().replace(' ','^'))::2])

### FIXED CODE ###

input();print('YNEOS'[sum(int(i)%2for i in input().split())%2::2])
N, Q = [int(i) for i in input().split()]
g = [1] * N

s = input()
dict = {}
for i in range(N):
  if s[i] not in dict:
    dict[s[i]] = []
  dict[s[i]].append({ "L": i - 1, "R": i + 1, "P": i })

for i in range(Q):
  t_i, d_i = input().split()
  if t_i not in dict:
    continue
  for x in dict[t_i]:
    if x[d_i] < 0:
      g[x["P"]] = 0
      continue
    elif x[d_i] >= N:
      g[x["P"]] = 0
      continue
    else:
      g[x[d_i]] += g[x["P"]]
      g[x["P"]] = 0

print(sum(g))


### FIXED CODE ###

A, B, C = [int(i) for i in input().split()]

if A == B & B == C:
  print("Yes")
else:
  print("No")
N, K = map(int, input().split())
A = list(map(int, input().split()))

dist = A[0]
visited = {1}
_v = [1]
stop = 0
for _ in range(10**5+1):
    if dist in visited:
        stop = dist
        break
    visited.add(dist)
    _v.append(dist)
    dist = A[dist-1]

made = 0
for i in range(len(_v)):
    if _v[i] == stop:
        break
    made += 1

loop = len(_v) - made
_v = _v[made:]

# print(stop)
# print(loop)
# print(made)
# print(_v)

if K <= made:
    print(_v[K])
else:
    K -= made
    K %= loop
    print(_v[K])

### FIXED CODE ###

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

dist = A[0]
visited = {1}
_v = [1]
stop = 0
while True:
    if dist in visited:
        stop = dist
        break
    visited.add(dist)
    _v.append(dist)
    dist = A[dist-1]

made = 0
l = len(_v)
for i in range(l):
    if _v[i] == stop:
        break
    made += 1

# print(stop)
# print(loop)
# print(made)
# print(_v)

if K <= made:
    print(_v[K])
else:
    loop = l - made
    _v = _v[made:]
    K -= made
    K %= loop
    print(_v[K])
N,M=map(int, input().split())
if N==m:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N,M=map(int, input().split())
if N==M:
  print('Yes')
else:
  print('No')
n, m, l = map(int, input().split())

A = []
B = []

for _ in range(n):
    A.append(list(map(int, input().split())))

for _ in range(m):
    B.append(list(map(int, input().split())))

C = [[sum([A[i][k] * B[k][j] for k in range(m)]) for j in range(n)] for i in range(l)]

for row in C:
    print(' '.join(map(str, row)))

### FIXED CODE ###

n, m, l = map(int, input().split())

A = []
B = []

for _ in range(n):
    A.append(list(map(int, input().split())))

for _ in range(m):
    B.append(list(map(int, input().split())))

C = [[sum([A[i][k] * B[k][j] for k in range(m)]) for j in range(l)] for i in range(n)]

for row in C:
    print(' '.join(map(str, row)))
S = input()
n = len(S)
ans = 0
l = 0
r = 0
for i in range(n - 1):
    if S[i] == '>' and S[i + 1] == ('<'):
        temp = i
        break
if S[0] == '<':
    temp = -1
ans += (temp+1) * (temp + 2) // 2
i = max(temp, 0)
while(i < n):
    while (i < n and S[i] == '<'):
        l += 1
        i += 1
    while (i < n and S[i] == '>'):
        r += 1
        i += 1
    l, r = min(l, r), max(l, r)
    ans += l * (l - 1) // 2 + r * (r + 1) // 2
    l = 0
    r = 0

print(ans)


### FIXED CODE ###

S = input()
n = len(S)
S = S + " "
ans = 0
l = 0
r = 0
temp = 0

if S[0] == '<':
    temp = 0
else:
    for i in range(n):
        if S[i] == '>' and S[i + 1] == ('<'):
            temp = i+1
            break
        if i == n - 1:
            print((n + 1) * n // 2)
            exit()
ans += (temp) * (temp + 1) // 2
i = max(temp, 0)

while(i < n):
    while (i < n and S[i] == '<'):
        l += 1
        i += 1
    while (i < n and S[i] == '>'):
        r += 1
        i += 1
    l, r = min(l, r), max(l, r)
    ans += l * (l - 1) // 2 + r * (r + 1) // 2
    l = 0
    r = 0

l, r = min(l, r), max(l, r)
ans += l * (l - 1) // 2 + r * (r + 1) // 2
print(ans)
def gcd(a, b):
    if a < b:
        return gcd(b, a)
    if b == 0:
        return a
    else:
        return gcd(b, a % b)


def main():
    N, M = map(int, input().split())
    S, T = input().split()

    g = gcd(N, M)
    for i in range(g):
        if S[i * N / g] == T[i * M / g]:
            print("-1")
            exit()
    print(N * M / g)

main()


### FIXED CODE ###

def gcd(a, b):
    if a < b:
        return gcd(b, a)
    if b == 0:
        return a
    else:
        return gcd(b, a % b)


def main():
    N, M = map(int, input().split())
    S = input()
    T = input()

    g = gcd(N, M)
    for i in range(g):
        if S[i * N // g] != T[i * M // g]:
            print("-1")
            exit()
    print(N * M // g)

main()
def main():
N = int(input())
A = list(map(int,input().split()))
if 0 in A:
    print(0)
    return
prod = 1
for a in A:
    prod *= a
    if prod > 1000000000000000000:
        print(-1)
        return
print(prod)
main()


### FIXED CODE ###

def main():
    N = int(input())
    A = list(map(int,input().split()))
    if 0 in A:
        print(0)
        return
    prod = 1
    for a in A:
        prod *= a
        if prod > 1000000000000000000:
            print(-1)
            return
    print(prod)
    
main()
N=int(input())
E=[[] for _ in range(N)]
for i in range(N-1):
  a,b = map(int, input().split())
  E[a-1].append((b-1,i))
ans=[[] for _ in range(N-1)]
def sub(p, n):
  m=1
  for a,b in E[p]:
    if m == n: m+=1
    ans[b]=m
    sub(a,m)
    m+=1
sub(0,0)
print(max(ans))
for a in ans:
  print(a)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**9)

N=int(input())
E=[[] for _ in range(N)]
for i in range(N-1):
  a,b = map(int, input().split())
  E[a-1].append((b-1,i))
ans=[[] for _ in range(N-1)]
def sub(p, n):
  m=1
  for b,i in E[p]:
    if m == n: m+=1
    ans[i]=m
    sub(b,m)
    m+=1
sub(0,0)
print(max(ans))
for a in ans:
  print(a)
n,q = map(int,input().split())
r = [[] for i in range(n)]
v = [0 for i in range(n)]

for i in range(n-1):
    a,b = map(int,input().split())
    r[a-1].append(b-1)

for i in range(q):
    p,x = map(int,input().split())
    v[p-1] += x


bfs = [0]
visit = [False in range(n)]
while len(bfs) != 0:
    tmp = []
    for i in bfs:
        for y in r[i]:
            if not visit[y]:
                v[y] += v[i]
                tmp.append(y)
        visit[i] = True
    bfs = tmp

#print(" ".join(map(str,v)))
print(*v)

### FIXED CODE ###

n,q = map(int,input().split())
r = [[] for i in range(n+1)]
v = [0 for i in range(n+1)]

for i in range(n-1):
    a,b = map(int,input().split())
    r[a].append(b)

for i in range(q):
    p,x = map(int,input().split())
    v[p] += x


for i in range(1,n+1):

    for y in r[i]:
        v[y] += v[i]

print(" ".join(map(str,v[1:])))
atcoder = input()
ACGT = 'ACGT'

s = ''
sub_list = []
for i, l in enumerate(list(atcoder)):
    if l in list(ACGT):
        s += l
    else:
        if s != '':
            sub_list.append(len(s))
        s = ''

print(max(sub_list))

### FIXED CODE ###

atcoder = input()
ACGT = list('ACGT')

s = ''
sub_list = []
for i, l in enumerate(list(atcoder)):
    if l in ACGT:
        s += l
        if i == len(atcoder)-1:
            sub_list.append(len(s))
    else:
        sub_list.append(len(s))
        s = ''
print(max(sub_list))
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
n = ii()
music = []
length = []
for i in range(n):
    ti,leng = map(str,input().split())
    music.append(ti)
    length.append(leng)
x = input()

num = music.index(x)
print(sum(length[x::]))

### FIXED CODE ###

def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
n = ii()
music = []
length = []
for i in range(n):
    ti,leng = map(str,input().split())
    music.append(ti)
    length.append(int(leng))
x = input()

num = music.index(x)
print(sum(length[num+1::]))
A, B, K = map(int, input().split())
try:
    small = list(range(A, B + 1))[:K]
    big = list(range(A, B + 1))[-K:]
    nums = small + big
except:
    nums = list(range(A, B + 1))
for num in set(nums):
    print(num)


### FIXED CODE ###

A, B, K = map(int, input().split())
num_range = range(A, B + 1)
for i in sorted(set(num_range[:K]) | set(num_range[-K:])):
    print(i)
from collections import*
n, v = map(int, open(0).read().split())
def l(x):
    o = Counter(x).most_common()
    return [o[0][0], o[0][1], o[1][1]]
a, b = map(l, [v[::2], v[1::2]])
print(n-a[1]-b[1] if a[0]!=a[0] else n - max(a[1]+b[2], a[2]+b[1])


### FIXED CODE ###

from collections import*
n, *v = map(int, open(0).read().split())
a, b = [Counter(v[i::2]).most_common() + [(0,0)] for i in (0,1)]
s, x = a[0]
t, y = b[0]
print(n - [x+y, max(x+b[1][1], y+a[1][1])][s==t])
from sys import stdin
from itertools import accumulate
input = stdin.readline
from collections import Counter
N,M = map(int,input().split())
friends = [tuple(map(int,inp.split())) for inp in stdin.read().splitlines()]
father = list(range(N))
def getfather(x):
    if father[x] != x:
        father[x] = getfather(father[x])
    return father[x]
def union(x,y):
    fx = getfather(x)
    fy = getfather(y)
    if fx != fy:
        father[fx] = fy
for a,b in friends:
    union(a-1,b-1)
print(max(Counter([getfather(i) for i in range(N)]).values()))

### FIXED CODE ###

from sys import stdin


input = stdin.readline


N, M = map(int, input().split())
friends = [tuple(map(int, inp.strip().split())) for inp in stdin.read().splitlines()]
father = [-1] * N


def getfather(x):
    if father[x] < 0: return x
    father[x] = getfather(father[x])
    return father[x]


def union(x, y):
    x = getfather(x)
    y = getfather(y)
    if x != y:
        if father[x] > father[y]:
            x,y = y,x
        father[x] += father[y]
        father[y] = x;


for a, b in friends:
    union(a - 1, b - 1)
# print(max(Counter([getfather(i) for i in range(N)]).values()))
print(max([-father[getfather(i)] for i in range(N)] or [0]) )
l=list(input())
N=l[0]
A=l[1]
B=l[2]
syou=N//(A+B)
amari=N%(A+B)
kotae=syou*B+max(amari-A,0)
print(kotae)

### FIXED CODE ###

l=list(input().split())
N=int(l[0])
A=int(l[1])

B=int(l[2])
syou=N//(A+B)
amari=N%(A+B)
kotae=syou*A+min(amari,A)
print(kotae)
a,b=input().split

if(a=b):
  print("Yes")
  
if(a!=b):
  print("No")

### FIXED CODE ###

a,b=input().split()
if(a==b):
  print("Yes")
if(a!=b):
  print("No")
a,b,k=map(int,input().split())
if a==k:
  print(0,b)

elif a+b<=k:
  print(0,0)

  elif a>k:
  print(a-k,b)
  
else:
  print(0,b+a-k)
  
  
  


### FIXED CODE ###

a,b,k=map(int,input().split())
if a>=k:
  print(a-k,b)
  
else:
  print(0,max(0,a+b-k))
n, m = map(int, input().split())

lst = list(range(1, m+1)):

for _ in range(n):
  for i in lst:
    if i not in list(map(int, input().split()))[1:]:
      lst.pop(lst.index(i))
print(len(lst))

### FIXED CODE ###

n, m = map(int, input().split())
s = set(range(1, m+1))

for i in range(n):
  c, *a = map(int, input().split())
  s &= set(a)
  
print(len(s))
from collections import defaultdict
import sys
h, w, n = int(sys.stdin.readline().split())

m3x3 =defaultdict(list)
for _ in range(n):
    a, b = int(sys.stdin.readline().split())
    for i in range(max(0, a - 3),min(h - 2, a)):
        for j in range(max(0, b - 3),min(w - 2, b)):
            if (i,j) in  m3x3:
                m3x3[(i,j)] +=1
            else:
                m3x3[(i,j)] =1
v = list(m3x3.values())
k = m3x3.keys()
print((w-2)*(h-2)-len(k))
for j in range(1,10):
    print(v.count(j))


### FIXED CODE ###

h, w, n = map(int,input().split())
from collections import defaultdict
m3x3 =defaultdict(list)
for _ in range(n):
    a, b = map(int,input().split())
    for i in range(max(0, a - 3),min(h - 2, a)):
        for j in range(max(0, b - 3),min(w - 2, b)):
            if (i,j) in  m3x3:
                m3x3[(i,j)] +=1
            else:
                m3x3[(i,j)] =1
v = list(m3x3.values())
k = m3x3.keys()
print((w-2)*(h-2)-len(k))
for j in range(1,10):
    print(v.count(j))
M=10**9+7
n,k,*a=map(int,open(y:=0).read().split())
a.sort()
x=s=1
r=k
while r>0:
 if(t:=a[y]*a[y+1])>a[-x]*a[~x]:s=s*t%M;y+=2;r-=2
 else:s=s*a[-x]%M;x+=1;r-=1
if r:s*=a[-x]
if a[-1]<0<k%2:
 s=1
 for i in a[-k:]:s=s*i%M
print(s%M)

### FIXED CODE ###

def main():
    M=10**9+7
    n,k,*a=map(int,open(0).read().split())
    x,y=[],[]
    for i in a:
        if i>0:x+=i,
        if i<0:y+=i,
    if len(x)+len(y)<k or k%2 and not x and len(y)<n:
        print(0)
        return
    if n==k or k%2 and not x:
        c=1
        for i in sorted(x+y)[-k:]:
            c=c*i%M
        print(c)
        return
    x=sorted(x)[::-1][:k]
    i=len(x)
    y.sort()
    m=len(y)
    j=k-i
    if j%2:
        x=x[:-1]
        i-=1
        j+=1
    x+=y[:j]
    while i>1 and j+1<m and x[i-1]*x[i-2]<y[j]*y[j+1]:
        x[i-1],x[i-2]=y[j],y[j+1]
        i-=2
        j+=2
    c=1
    for i in x:
        c=c*i%M
    print(c)
main()
n = int(input())
lst = list(map(int,input().split()))
lst2 = [0 for i in range(n)]
for i in range(n):
  x = lst[i]
  lst2[x - 1] = lst2[x - 1] + 1
for i in range(n):
  print(lst2[i])

### FIXED CODE ###

n = int(input())
lst = list(map(int,input().split()))
lst2 = [0 for i in range(n)]
for i in range(n - 1):
  x = lst[i]
  lst2[x - 1] = lst2[x - 1] + 1
for i in range(n):
  print(lst2[i])
N = int(input())
if N <= 5:
    if N == 3: print('2 5 63')
    elif N == 4: print('2 5 20 63')
    elif N == 5: print('2 5 20 30 63')
else:
    flag = 0
    S = 0
    k = 0
    retList = list()
    Q = N // 4
    R = N % 4
    for q in range(len(Q)):
        S += 4*6*q + 15
        retList.append(str(6*q+2))
        retList.append(str(6*q+3))
        retList.append(str(6*q+4))
        retList.append(str(6*q+6))
    if R == 0:
        pass
    elif R == 1:
        S += 6*Q + 2
        retList.append(6*Q + 2)
    elif R == 2:
        S += 2*6*Q + 5
        retList.append(6*Q + 2)
        retList.append(6*Q + 3)
    elif R == 3:
        S += 3*6*Q + 12
        retList.append(6*Q + 2)
        retList.append(6*Q + 3)
        retList.append(6*Q + 5)

    # for i in range(len(N)):
    #     if flag%4 == 0: 
    #         S += 6*k + 2
    #         retList.append(str(6*k + 2))
    #     elif flag%4 == 1:
    #         S += 6*k + 3
    #         retList.append(str(6*k + 3))
    #     elif flag%4 == 2: 
    #         S += 6*k + 4
    #         retList.append(str(6*k + 4))
    #     elif flag%4 == 3: 
    #         S += 6*k + 6
    #         retList.append(str(6*k + 6))
    #         k += 1
        
    #     if flag == 4: flag = 0
    #     else: flag += 1

    if S%6 == 0:
        pass
    elif S%6 == 2:
        retList.remove('8')
        retList.append(str(6*k + 6))
    elif S%6 == 3:
        retList.remove('9')
        retList.append(str(6*(k+1) + 6))
    elif S%6 == 5:
        retList.remove('9')
        retList.append(str(6*(k+1) + 4))
    print(' '.join(retList))

### FIXED CODE ###

# import math
# from functools import reduce

# def gcd(*numbers):
#     return reduce(math.gcd, numbers)

N = int(input())
if N <= 5:
    if N == 3: print('2 5 63')
    elif N == 4: print('2 5 20 63')
    elif N == 5: print('2 5 20 30 63')
else:
    flag = 0
    S = 0
    k = 0
    retList = list()
    Q = N // 4
    R = N % 4
    for q in range(Q):
        S += 4*6*q + 15
        retList.append(str(6*q+2))
        retList.append(str(6*q+3))
        retList.append(str(6*q+4))
        retList.append(str(6*q+6))
    if R == 0:
        pass
    elif R == 1:
        S += 6*Q + 2
        retList.append(str(6*Q + 2))
    elif R == 2:
        S += 2*6*Q + 5
        retList.append(str(6*Q + 2))
        retList.append(str(6*Q + 3))
    elif R == 3:
        S += 3*6*Q + 9
        retList.append(str(6*Q + 2))
        retList.append(str(6*Q + 3))
        retList.append(str(6*Q + 4))

    if S%6 == 0:
        pass
    elif S%6 == 2:
        retList.remove('8')
        S -= 8
        S += 6*(Q+1) + 6
        retList.append(str(6*Q + 6))
    elif S%6 == 3:
        retList.remove('9')
        S -= 9
        S += 6*(Q+1) + 6
        retList.append(str(6*Q + 6))
    elif S%6 == 5:
        retList.remove('9')
        S -= 9
        S += 6*(Q+1) + 4
        retList.append(str(6*Q + 4))
    # print(S%6)
    # print(len(retList))
    # retIntList = list(map(int, retList))
    # for a in retIntList:
    #     if gcd(S, a) <= 1:
    #         print(S)
    #         print(a)
    print(' '.join(retList))
    # print(gcd(*retIntList))
from collections import deque

H, W = map(int, input().split())
grid = [list(input()) for i in range(H)]

# 初期が黒('#')の位置からの距離
dist = [[-1]*H for _ in range(W)]

# '#'の位置をキューに追加（＝今回はこれが複数あるので、複数スタートとなる）
black_cells = deque()
for h in range(H):
    for w in range(W):
        if grid[h][w] == '#':
            black_cells.append([h, w])
            dist[h][w] = 0

def bfs(black_cells, dist):
    d = 0
    while len(black_cells) > 0:
        # キューとして使うのでpop()ではなくpopleft()
        h, w = black_cells.popleft()  # 黒いセルの座標
        d = dist[h][w]
        for dy, dx in [[1, 0], [0, 1], [-1, 0], [0, -1]]:
            new_h = h + dy
            new_w = w + dx
            if new_h < 0 or H <= new_h or new_w < 0 or W <= new_w:
                continue
            if dist[new_h][new_w] == -1:  # セルが白('.')であるのと同義
                dist[new_h][new_w] = d+1
                black_cells.append([new_h, new_w])
    return d

d = bfs(black_cells, dist)
print(d)

### FIXED CODE ###

from collections import deque

H, W = map(int, input().split())
grid = [list(input()) for i in range(H)]

# '#'の位置をキューに追加（＝今回はこれが複数あるので、複数スタートとなる）
black_cells = deque()
for h in range(H):
    for w in range(W):
        if grid[h][w] == '#':
            black_cells.append([h, w, 0])

ans = 0
while len(black_cells) > 0:
    one_black_cell = black_cells.popleft()  # キューとして使うのでpop()ではなくpopleft()
    for dy, dx in [[1, 0], [0, 1], [-1, 0], [0, -1]]:
        nh = one_black_cell[0] + dy
        nw = one_black_cell[1] + dx
        d = one_black_cell[2]
        if nh < 0 or H <= nh or nw < 0 or W <= nw:
            continue
        if grid[nh][nw] == '.':
            grid[nh][nw] = '#'
            black_cells.append([nh, nw, d + 1])
        ans = d

print(ans)
n = int(input())
li = [list(map(int,input().split())) for _ in range(n)]

ans = 0
cnt = 0
li.sort()
temp = []

while True:
    arr = []
    check = -10**10
    if len(temp) == 0:
        for i in range(n):
            s = li[i][0] - li[i][1]
            if check > s:
                arr.append(i-1)
                arr.append(i)
            check = li[i][0] + li[i][1]
    else:
        for i in temp:
            s = li[i][0] - li[i][1]
            if check > s:
                arr.append(i-1)
                arr.append(i)
            check = li[i][0] + li[i][1]
    if len(arr) == 0:
        break
    arr = list(set(arr))
    temp = arr
    t = -2
    for index,i in enumerate(arr):
        if t == -2:
            t = i
        elif t+1 == i:
            del temp[index]
            t = -2
            ans += 1
        else:
            t = i

print(n-ans)

### FIXED CODE ###

n,k,s = map(int,input().split())

if s >= 10**9:
    ans = [1]*n
else:
    ans = [10**9] * n

for i in range(k):
    ans[i] = s

print(*ans)
n = map(int, input().split())

while n == 0:
    a += n
    n -= 1
print(a)


### FIXED CODE ###

n = int(input())
a = 0
while n > 0:
    a += n
    n -= 1
print(a)
import sys

SUITS = ('S', 'H', 'C', 'D')
cards = {suit:{i for i in range(1, 14)} for suit in SUITS}

input()

for line in sys.stdin:
    suit, number = line.split()
    cards[suit].discard(int(number))

for suit in SUITS:
    for i in cards[suit]:
    print(suit, i)







### FIXED CODE ###

import sys

SUITS = ('S', 'H', 'C', 'D')
cards = {suit:{i for i in range(1, 14)} for suit in SUITS}

input()

for line in sys.stdin:
    suit, number = line.split()
    cards[suit].discard(int(number))

for suit in SUITS:
    for i in cards[suit]:
        print(suit, i)
# D submit
from math import sqrt
def sieve(n):
    if n<2:
        return [False]*(n+1)
    is_prime = [True]*(n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(sqrt(n))+1):
        if is_prime[i]:
            for j in range(i*2, n+1, i):
                is_prime[j] = False
    return is_prime

n = int(1e5)
is_prime = sieve(n)

cnt = [0]*(n+1)
for i in range(1, N+1):
    cnt[i] += cnt[i-1]
    if is_prime[i] and is_prime[(i+1)//2]:
        cnt[i] += 1
q = int(input())
for _ in range(q):
    l, r = map(int, input().split())
    print(cnt[r] - cnt[l-1])

### FIXED CODE ###

# D submit
from math import sqrt
def sieve(n):
    if n<2:
        return [False]*(n+1)
    is_prime = [True]*(n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(sqrt(n))+1):
        if is_prime[i]:
            for j in range(i*2, n+1, i):
                is_prime[j] = False
    return is_prime

n = int(1e5)
is_prime = sieve(n)

cnt = [0]*(n+1)
for i in range(1, n+1):
    cnt[i] += cnt[i-1]
    if is_prime[i] and is_prime[(i+1)//2]:
        cnt[i] += 1
q = int(input())
for _ in range(q):
    l, r = map(int, input().split())
    print(cnt[r] - cnt[l-1])
from bisect import bisect
from bisect import bisect_left
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for i in range(n):
  for j in range(i+1, n):
    left = abs(a-b)
    right = a+b
    ans += max(0, bisect_left(l, right) - bisect(l,left))
    if left < a < right:
      ans -= 1
    if left < b < right:
      ans -= 1
print(ans)

### FIXED CODE ###

from bisect import bisect
from bisect import bisect_left
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for i in range(n):
  for j in range(i+1, n):
    left = l[j]-l[i]
    right = l[i]+l[j]
    ans += max(0, bisect_left(l, right) - max(j+1, bisect(l,left)))
print(ans)
S = input()
T = input()
count = 0
for s, t in S, T:
  if s != t:
    count += 1
print(count)

### FIXED CODE ###

S = input()
T = input()
count = 0
for i in range(len(S)):
  if S[i] != T[i]:
    count += 1
print(count)
n = input()
a_list = list(map(int, input().split()))
a_set = set(a)

if len(a_list) == len(a_set):
  print("YES")
else:
  print("NO")

### FIXED CODE ###

n = input()
a_list = list(map(int, input().split()))
a_set = set(a_list)

if len(a_list) == len(a_set):
  print("YES")
else:
  print("NO")