Harryxun/stf_run huggingface dataset:
import math
def func1(lst, value):
    return [i+1 for i, x in enumerate(lst) if x == value]
N = int(input())
a = list(map(int,input().split()))

b = [0] * N
half = math.ceil(N/2)
summ = 0
for i in reversed(range(N)):
    # print(i)
    if i >= half-1:
        b[i] = a[i]
    else:
    x = N//(i+1)
    # print("x",x)
        if x == 1:
            b[i] = a[i]
        else:
            for j in range(x):
                # print(j)
                summ += a[(i+1)*(j+1)-1]
            summ -= a[i]
            # print("sum=",summ)
            judge=summ%2
            # print("judge",judge)
            if (judge==0 and a[i]==0) or (judge==1 and a[i]==1):
                b[i] = 0
            else:
                b[i] = 1
            summ = 0
            judge = 0
# print(b)
print(sum(b))
if sum(b) != 0:
    ans = func1(b,1)
    # print(ans)
    if len(ans)>1:
        ans = map(str,ans)
        print(" ".join(ans))
    else:
        print(ans.pop())

### FIXED CODE ###

import math
def func1(lst, value):
    return [i+1 for i, x in enumerate(lst) if x == value]
N = int(input())
a = list(map(int,input().split()))

b = [0] * N
# half = math.ceil(N/2)
summ = 0
for i in reversed(range(N)):
# print(i)
    x = N//(i+1)
# print("x",x)
    if x == 1:
        b[i] = a[i]
    else:
        for j in range(x):
            # print(j)
            summ += b[(i+1)*(j+1)-1]
        # summ -= a[i]
        # print("sum=",summ)
        judge=summ%2
        # print("judge",judge)
        if (judge==0 and a[i]==0) or (judge==1 and a[i]==1):
            b[i] = 0
        else:
            b[i] = 1
        summ = 0
        judge = 0
# print(b)
print(sum(b))
if sum(b) != 0:
    ans = func1(b,1)
    # print(ans)
    if len(ans)>1:
        ans = map(str,ans)
        print(" ".join(ans))
    else:
        print(str(ans.pop()))
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instr = lambda: sys.stdin.readline()
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
A = inintl()

c = 0
cnt = [0]*n

for i in range(n):
    cnt[A[i]] += 1

def combinations(n):
    return n*(n-1)//2

for i in range(n):
    c += combinations(cnt[i])

for i in range(n):
    ans = c
    ans -= combinations(cnt[A[i]])
    ans += combinations(cnt[A[i]]-1)
    print(ans)



### FIXED CODE ###

import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instr = lambda: sys.stdin.readline()
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
A = inintl()

c = 0
cnt = [0]*n

for i in range(n):
    A[i] -= 1

for i in range(n):
    cnt[A[i]] += 1

def combinations(n):
    return n*(n-1)//2

for i in range(n):
    c += combinations(cnt[i])

for i in range(n):
    ans = c
    ans -= combinations(cnt[A[i]])
    ans += combinations(cnt[A[i]]-1)
    print(ans)
if z =< d:
    print("Yse")
elif x =< d and y =< d:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

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

x = abs(a - b)
y = abs(b - c)
z = abs(a - c)

if d >= z:
    print("Yes")
elif d >= x and d >= y:
    print("Yes")
else:
    print("No")
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
N = int(input())
a = int(input())
for i in range(N-1):
    b = int(input())
    c = a * b / gcd(a, b)
    a = b
    b = c
print(int(c))


### FIXED CODE ###

from fractions import gcd
from functools import reduce

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))
def lcm_base(x, y):
    return(x*y)//gcd(x,y)
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

print(lcm(T))
p=int(input())
q=int(input())
r=int(input())
if p+q<q+r and p+q<p+r:
    print(p+q)

else:
    print(q+r)



### FIXED CODE ###

p,q,r=map(int,input().split())
if p>=q and p>r:
    print(q+r)
if q>=r and q>p:
    print(p+r)
if r>=p and r>q:
    print(q+p)
if r==p and p==q:
    print(q+p)
def fl(x):
    digits = 8
    form = '%.'+str(digits-1)+'e'
    return float((form % x))
a,b,x=map(int,input().split())
import math
if x>=a*b/2:
    print(90 - math.degrees(math.atan(fl(a / 2 / (b - fl(x / a ** 2))))))
else:
    tate=fl(2*x/a/b)
    print(90-math.degrees(math.atan(fl(tate/b))))


### FIXED CODE ###

import math
a,b,x=map(int,input().split())
S=x/a
if S<=a*b/2:
    h=2*S/b
    answer=math.degrees(math.atan(b/h))
    print(answer)
else:
    T=a*b-S
    h=2*T/a
    answer=math.degrees(math.atan(h/a))
    print(answer)
A=int(input().split())
for i in range(3):
  if A[i]==1:
    A[i]=9
  else if A[i]==9:
    A[i]=1
print(A)

### FIXED CODE ###

n = input()
for c in n:
    if (c == '1'):
        print('9', end='')
    elif (c == '9'):
        print('1', end='')
    else:
        print(c, end='')
print()
D = int(input())
c = list(map(int, input().split()))
s = [list(map(int, input().split())) for i in range(D)]
t = [int(input()) for i in range(D)]
last = [[-1] for i in range(26)]
# before query
ans = 0
for i in range(D):
    op = t[i]-1
    ans += s[i][op]
    last[op].append(i)
    for j in range(26):
        ans -= c[j]*(i-last[j][-1])
    # print(ans)
from bisect import *

m = int(input())
def suminc(a,b):
    return b*(b-1)//2-a*(a-1)//2
while m:
    m-=1
    update = 0
    d,q = map(int, input().split())
    d-=1
    q-=1
    oq = t[d]-1
    update += s[d][q]-s[d][oq]
    idx = bisect_left(last[oq],d)
    if idx == len(last[oq])-1:
        cnt = D - last[oq][idx]
    else:
        cnt = last[oq][idx+1] - last[oq][idx]
    update += c[oq]*suminc(0,cnt)
    cntprv = last[oq][idx] - last[oq][idx-1]
    update -= c[oq]*suminc(cntprv,cntprv+cnt)

    idx2 = bisect_left(last[q],d)-1
    if idx2 == len(last[q])-1:
        cnt = D - d
    else:
        cnt = last[oq][idx2+1] - d
    if idx2 == len(last[q])-1:
        cntprv = D - last[oq][idx2] - cnt
    else:
        cntprv = last[oq][idx2+1] - last[oq][idx2] - cnt
    update += c[q]*suminc(cntprv,cntprv+cnt)
    update -= c[q]*suminc(0,cnt)

    ans += update
    del last[oq][idx]
    last[q].insert(idx2+1,d)
    print(ans)
    t[d] = q+1







    

### FIXED CODE ###

D = int(input())
c = list(map(int, input().split()))
s = [list(map(int, input().split())) for i in range(D)]
t = [int(input()) for i in range(D)]
last = [[-1] for i in range(26)]
# before query
ans = 0
for i in range(D):
    op = t[i]-1
    ans += s[i][op]
    last[op].append(i)
    for j in range(26):
        ans -= c[j]*(i-last[j][-1])
    # print(ans)
from bisect import *
import random
m = int(input())
def suminc(a,b):
    return b*(b-1)//2-a*(a-1)//2
while m:
    m-=1
    update = 0
    d,q = map(int, input().split())
    # d = random.randint(1,365)
    # q = random.randint(1,26)
    d-=1
    q-=1
    oq = t[d]-1
    update += s[d][q]-s[d][oq]
    idx = bisect_left(last[oq],d)
    if idx == len(last[oq])-1:
        cnt = D - last[oq][idx]
    else:
        cnt = last[oq][idx+1] - last[oq][idx]
    update += c[oq]*suminc(0,cnt)
    cntprv = last[oq][idx] - last[oq][idx-1]
    update -= c[oq]*suminc(cntprv,cntprv+cnt)

    idx2 = bisect_left(last[q],d)-1
    if idx2 == len(last[q])-1:
        cnt = D - d
    else:
        cnt = last[q][idx2+1] - d
    if idx2 == len(last[q])-1:
        cntprv = D - last[q][idx2] - cnt
    else:
        cntprv = last[q][idx2+1] - last[q][idx2] - cnt
    update += c[q]*suminc(cntprv,cntprv+cnt)
    update -= c[q]*suminc(0,cnt)

    ans += update
    del last[oq][idx]
    last[q].insert(idx2+1,d)
    print(ans)
    t[d] = q+1
n, q = map(int, input().split())
edge = [[] for i in range(n)]
for i in range(n-1):
    a, b = map(int, input().split())
    a, b = a-1, b-1
    edge[a].append(b)
    edge[b].append(a)

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

def dfs(v, p):
    for u in edge[v]:
        if u == p:
            continue
        imos[u] += imos[v]
        dfs(u, v)

dfs(0, -1)
print(' '.join([str(x) for x in imos]))


### FIXED CODE ###

from collections import deque

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

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

dq = deque([(0, -1)])
while dq:
    v, p = dq.popleft()
    for u in edge[v]:
        if u == p:
            continue
        imos[u] += imos[v]
        dq.append((u, v))

print(' '.join([str(x) for x in imos]))
a=int(input())
li = [int(input()) for i in range(a)]
li.sort()

def gcm(x,y):
  #x<=y
  if x==y:
    return x
  else:
    if y%x==0:
      return x
    else:
      return gcm(y%x,x)


def lcm(x,y):
  return x*y/gcm(x,y)

ans=li[0]
for i in range(a-1):
  ans=lcm(ans,li[i+1])

print(int(ans))

### FIXED CODE ###

a=int(input())
li = [int(input()) for i in range(a)]
li.sort()

def gcd(x,y):
  #x<=y
  if x==y:
    return x
  else:
    if y%x==0:
      return x
    else:
      return gcd(y%x,x)


def lcm(x,y):
  return x*y//gcd(x,y)

ans=li[0]
for i in range(a-1):
  if ans<=li[i+1]:
    ans=lcm(ans,li[i+1])
  else:
    ans=lcm(li[i+1],ans)

print(int(ans))
import itertools
import math
from collections import deque
from collections import defaultdict
from itertools import permutations
import heapq
import bisect
from scipy.sparse.csgraph import floyd_warshall as wf
from collections import Counter
inf = 10**10
from itertools import*


n,m = map(int,input().split())
X = [list(map(int,input().split())) for i in range(n)]
res = 0
for (a,b,c) in product([-1,1],[-1,1],[-1,1]):
    tmp=[]
    for x,y,z in X:
        tmp.append(a*x+b*y+c*z)
    tmp.sort(reverse=True)
    res = max(res,sum(tmp[:m]))

print(res)

### FIXED CODE ###

N,M = map(int,input().split())
x=[]
y=[]
z=[]
for i in range(N):
    xi,yi,zi = map(int,input().split())
    x.append(xi)
    y.append(yi)
    z.append(zi)
ppp =[]
ppm =[]
pmp =[]
mpp =[]
mmp =[]
mpm =[]
pmm =[]
mmm =[]
for i in range(N):
    xp = x[i]
    xm = -x[i]
    yp = y[i]
    ym = -y[i]
    zp = z[i]
    zm = -z[i]
    ppp.append(xp+yp+zp)
    ppm.append(xp+yp+zm)
    pmp.append(xp+ym+zp)
    mpp.append(xm+yp+zp)
    mmp.append(xm+ym+zp)
    mpm.append(xm+yp+zm)
    pmm.append(xp+ym+zm)
    mmm.append(xm+ym+zm)
ppp.sort(reverse=True)
ppm.sort(reverse=True)
pmp.sort(reverse=True)
mpp.sort(reverse=True)
mmp.sort(reverse=True)
mpm.sort(reverse=True)
pmm.sort(reverse=True)
mmm.sort(reverse=True)
print(max(sum(ppp[0:M]),sum(ppm[0:M]),sum(pmp[0:M]),sum(mpp[0:M]),sum(mmp[0:M]),sum(mpm[0:M]),sum(pmm[0:M]),sum(mmm[0:M])))
from collections import defaultdict as dd
    N,X,Y = map(int,input().split())
     
    pdic = dd(lambda:0)
     
    # count = 0
     
    for i in range(1,N):
        for j in range(i+1,N+1):
            
    #         count += 1
            
            # no shortcut
            d1 = j-i
            # with shortcut
            i2x = abs(X-i)
            y2j = abs(Y-j)
            d2 = i2x + y2j + 1
            
            dist = min(d1,d2)
            pdic[str(dist)] += 1
            
    for n in range(1,N):
        print(pdic[str(n)])
        
    # print("count:",count)

### FIXED CODE ###

from collections import defaultdict as dd
N,X,Y = map(int,input().split())

pdic = dd(lambda:0)

# count = 0

for i in range(1,N):
    for j in range(i+1,N+1):

#         count += 1

        # no shortcut
        d1 = j-i
        # with shortcut
        i2x = abs(X-i)
        y2j = abs(Y-j)
        d2 = i2x + y2j + 1

        dist = min(d1,d2)
        pdic[str(dist)] += 1

for n in range(1,N):
    print(pdic[str(n)])

# print("count:",count)
N = int(input())
S = input()
sride = 1
count = 0
max_num = 0
for i in range(N-1):
  for j in range(N-sride):
    if S[j] == S[j+sride]:
      count += 1
      max_num = max(max_num, count)
    else:
      count = 0
    if count == sride:
      max_num = max(max_nuzm, count)
      break
  sride += 1
  count = 0
print(max_num)


### FIXED CODE ###

N = int(input())
S = input()
sride = 1
count = 0
max_num = 0
for i in range(N-1):
  for j in range(N-sride):
    if S[j] == S[j+sride]:
      count += 1
      max_num = max(max_num, count)
    else:
      count = 0
    if count == sride:
      max_num = max(max_num, count)
      break
  sride += 1
  count = 0
print(max_num)
import sys
from collections import Counter
n=int(input())
a=list(map(int,input().split()))
a.sort(reverse=True)
for i in range(n-1):
    if a[i]=a[i+1]:
        a[i+1]==0
    else:
        a[i]=0
a.sort(reverse=True)
print(a[0]*a[1])


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
a.sort()
a.reverse()
for i in range(n-1):
    if a[i]==a[i+1]:
        a[i+1]=0
    else:
        a[i]=0
a.sort()
a.reverse()
print(a[0]*a[1])
s = input(:)
w = input(:)
S = int(s)
W = int(w)
if S>=W:
  print("unsafe")
else:
  print("safe")

### FIXED CODE ###

S, W = map(int, input().split())

if S <= W:
    print("unsafe")
else:
    print("safe")
N = input()
S = 0
for n in N:
  S += n
N = int(N)
print("Yes" if N%S == 0 else "No")


### FIXED CODE ###

N = input()
mylist = []
for i in range(len(N)):
  mylist.append(N[i])
newlist = [int(s) for s in mylist]
divisor = 0
for j in range(len(newlist)):
  divisor += newlist[j]
N = int(N)
if N%divisor == 0:
  print("Yes")
else:
  print("No")
import sys

n = int(input())
dn = list(map(int, input().split()))
m = int(input())
tn = list(map(int, input().split()))

d_num = [0 for i in range(200001)]
t_num = [0 for i in range(200001)]

for i in range(len(dn)):
    d_num[dn[i]] += 1

for i in range(len(tn)):
    t_num[tn[i]] += 1
    
for i in range(len(t_num)):
    if d_num[i] < t_num[i]:
        print("NO")
        sys.exit()
print("YES")

### FIXED CODE ###

import sys

n = int(input())
dn = list(map(int, input().split()))
m = int(input())
tn = list(map(int, input().split()))

num_dict = {}

for i in range(n):
    if str(dn[i]) in num_dict.keys():
        num_dict[str(dn[i])] += 1
    else:
        num_dict[str(dn[i])] = 1

for i in range(m):
    if str(tn[i]) in num_dict.keys():
        num_dict[str(tn[i])] += -1
    else:
        print("NO")
        sys.exit()

result_list = list(num_dict.values())
for i in range(len(result_list)):
    if result_list[i] < 0:
        print("NO")
        sys.exit()
print("YES")
r,c = int(input().split())
ans = r*c/2
if(r%2==0 and c%2==0):
    print(ans)
else
    print(ans+1) 

### FIXED CODE ###

import math
h,w = map(int,input().split())
if h==1 or w==1:
  print(1)
else:
  nos = math.ceil(w/2)*math.ceil(h/2) + math.floor(w/2)*math.floor(h/2)
  print(nos)
n = input()
A = map(int,raw_input().split())
q = input()
M = map(int,raw_input().split())

def tansaku(Mi,i):
    if Mi == 0: return True
    if i < n and min(A[i:] <= Mi <= sum(A[i:]):
        r1 = tansaku(Mi-A[i],i+1) #Mi-A[i] == 0 ????????°???True
        if r1: return r1
        r2 = tansaku(Mi,i+1)
        if r2: return r2
        
for Mi in M:
    print "yes" if solve(Mi,0) else "no"

### FIXED CODE ###


def solve(Mi,i):
    if Mi == 0: return True
    if i < n and min(A[i:]) <= Mi <= sum(A[i:]):
        r1 = solve(Mi-A[i],i+1)
        if r1: return r1
        r2 = solve(Mi,i+1)
        if r2: return r2
n = input()
A = map(int,raw_input().split())
q = input()
M = map(int,raw_input().split())
for Mi in M:
    print "yes" if solve(Mi,0) else "no"
menu = [int(input()) for _ in range(5)]
last = 10**18
last_menu = 0
for i in range(5):
  if menu[i]%10 != 0:
    last = min(last, menu[i]%10)
  if last == menu[i]%10:
    num = i
last_menu = menu.pop(num)

time = 0
for j in range(len(menu)):
  if menu[j]%10 == 0:
    time += menu[j]
  else:
    time += menu[j] + (10 - menu[j]%10)
time += last_menu

print(time)

### FIXED CODE ###

menu = [int(input()) for _ in range(5)]
last = 10**18
last_menu = 0
num = -1
for i in range(len(menu)):
  if menu[i]%10 != 0:
    last = min(last, menu[i]%10)
  if last == menu[i]%10:
    num = i
if num >= 0:
  last_menu = menu.pop(num)

time = 0
for j in range(len(menu)):
  if menu[j]%10 == 0:
    time += menu[j]
  else:
    time += menu[j] + (10 - menu[j]%10)
time += last_menu

print(time)
number=input()
list=number.split()
list.sort()
for x in list:
    print x,


### FIXED CODE ###

number=input()
list=number.split()
list.sort()
print(list[0]+" "+list[1]+" "+list[2])
s = input()

for bit in range(1 << (3)):
    f = s[0]
    
    for i in range(3):
        # if bit & (1 << i)で、bitにiが含まれているか（フラグが立っているか）を判定してくれるらしい
        if bit & (1 << i):
            f += '+'
        f += s[i + 1]
    if sum(list(map(int, f.split('+')))) == 7:
        print(f"{f}=7")
        exit()

### FIXED CODE ###

s = input()

for bit in range(1 << (3)):
    f = s[0]
    
    for i in range(3):
        # if bit & (1 << i)で、bitにiが含まれているか（フラグが立っているか）を判定してくれるらしい
        if bit & (1 << i):
            f += '+'
        else:
            f += '-'
        f += s[i+1]    
    if eval(f)  == 7:
        f += "=7"
        print(f)
        exit()
N_K = list(map(int, input().split()))

count = 0

for a in range(1, N_K+1[0]):
  for b in range(1, N_K+1[0]):
    if a % b >= N_K[1]:
      count += 1
    
print(count)

### FIXED CODE ###

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

for b in range(1, N+1):
	p = N // b
	r = N % b
	
	ans += p * max(0, b-K)
	ans += max(0, r-K+1)
	
print(ans-N*(not K))
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(input())
a = list(map(int, input().split()))
MOD = 10 ** 9 + 7

import collections

lcm_pf = collections.defaultdict(int)
for i, v in enumerate(a):
    j = 2
    pf = {}
    while j ** 2 <= v:
        ext = 0
        while v % j == 0:
            ext += 1
            v //= j
        if ext:
            pf[j] = ext
            lcm_pf[j] = max(lcm_pf[j], ext)
        j += 1
    if v != 1:
        pf[v] = 1
        lcm_pf[v] = max(lcm_pf[v], 1)

lcm = 1
for p in lcm_pf:
    lcm = lcm * (p ** lcm_pf[p])

ans = 0
for v in a:
    #ans = ans + (lcm // v)) % MOD
    ans = ans + (lcm // v)) % MOD
print(ans % MOD)


### FIXED CODE ###

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

n = int(input())
a = list(map(int, input().split()))
MOD = 10 ** 9 + 7

import collections

lcm_pf = collections.defaultdict(int)
for i, v in enumerate(a):
    j = 2
    pf = {}
    while j ** 2 <= v:
        ext = 0
        while v % j == 0:
            ext += 1
            v //= j
        if ext:
            pf[j] = ext
            lcm_pf[j] = max(lcm_pf[j], ext)
        j += 1
    if v != 1:
        pf[v] = 1
        lcm_pf[v] = max(lcm_pf[v], 1)

lcm = 1
for p in lcm_pf:
    lcm = lcm * (p ** lcm_pf[p])

ans = 0
for v in a:
    ans = ans + (lcm // v)
print(ans % MOD)
from collections import Counter
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce


def input():
    return sys.stdin.readline().strip()


def iinput():
    return int(input())


def tinput():
    return input().split()


def rinput():
    return map(int, tinput())


def rlinput():
    return list(rinput())


mod = int(1e9)+7


def factors(n):
    return set(reduce(list.__add__,
                      ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))


# ----------------------------------------------------

def dfs(i):
    visited[i] = True
    for node in g[i]:
        if not visited[node]:
            dfs(node)
        dp[i] = max(dp[i], 1+ dp[node])



if __name__ == "__main__":
    n, m = rinput()
    g = defaultdict(list)
    for i in range(m):
        x, y = rinput()
        g[x].append(y)
    dp = [0]*(n+1)
    visited = [False]*(n+1)
    for i in range(1, n+1):
        if not visited[i]:
            dfs(i)
            # print('-=============================')
    # print(dp)
    print(max(dp))


# 5 3
# 2 3
# 2 4
# 5 2
# 5 1
# 1 4
# 4 3
# 1 3

### FIXED CODE ###

from collections import Counter
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce

sys.setrecursionlimit(10000000)
def input():
    return sys.stdin.readline().strip()


def iinput():
    return int(input())


def tinput():
    return input().split()


def rinput():
    return map(int, tinput())


def rlinput():
    return list(rinput())


mod = int(1e9)+7


def factors(n):
    return set(reduce(list.__add__,
                      ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))


# ----------------------------------------------------

def dfs(i):
    visited[i] = True
    for node in g[i]:
        if not visited[node]:
            dfs(node)
        dp[i] = max(dp[i], 1+ dp[node])



if __name__ == "__main__":
    n, m = rinput()
    g = defaultdict(list)
    for i in range(m):
        x, y = rinput()
        g[x].append(y)
    dp = [0]*(n+1)
    visited = [False]*(n+1)
    for i in range(1, n+1):
        if not visited[i]:
            dfs(i)
            # print('-=============================')
    # print(dp)
    print(max(dp))


# 5 3
# 2 3
# 2 4
# 5 2
# 5 1
# 1 4
# 4 3
# 1 3
N, K = map(int, input().split())
A = list(map(int, input().split()))

def get_divisors(n):
    divisors = []
    for num in range(ceil(n**0.5), n+1):
        if n % num == 0:
            divisors.append(n//num)
            if n//num != n:
                divisors.append(num)
    divisors.sort(reverse=True)
    return divisors

total = sum(A)
divisors = get_divisors(total)
ans = -1
for d in divisors:
    R = [a%d for a in A]
    R.sort(reverse=True)
    pr = 0
    nr = -sum(R)
    for i, r in enumerate(R):
        pr += d-r
        nr += r
        if nr+pr >= 0:
            if pr <= K and nr+pr == 0:
                ans = d
            break
    if ans != -1:
        print(ans)
        break
else:
    print(1)


### FIXED CODE ###

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

# nの約数を求める。計算量O(sqrt(N))
def get_divisors(n):
    from math import sqrt, ceil
    from collections import deque
    divisors = deque([])
    for num in range(ceil(sqrt(n)), n+1):
        if n % num == 0:
            divisors.append(n//num)
            if n//num != n:
                divisors.appendleft(num)
    return list(divisors)


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n//i:
                divisors.append(n//i)
    divisors.sort(reverse=True)
    return divisors

total = sum(A)
divisors = make_divisors(total)
ans = -1
for d in divisors:
    R = [a%d for a in A]
    R.sort(reverse=True)
    pr = 0
    nr = -sum(R)
    for i, r in enumerate(R):
        pr += d-r
        nr += r
        if nr+pr >= 0:
            if pr <= K and nr+pr == 0:
                ans = d
            break
    if ans != -1:
        print(ans)
        break
else:
    print(1)
import logging
import unittest
from collections import (
    Counter,
)

debug = logging.getLogger(__name__).debug


def input_ints():
    return list(map(int, input().strip().split()))


def _main():
    n = input_ints()[0]
    xy = [input_ints() for _ in range(n)]

    (_, count), = Counter(
        (x1 - x2, y1 - y2)
        for (x1, y1) in xy
        for (x2, y2) in xy
        if not (x1 == x2 and y1 == y2)
    ).most_common(1)

    print(len(xy) - count)


class Test(unittest.TestCase):
    def setUp(self):
        import run
        self._test = run

    def test_main(self):
        self._test.test_files(self, _main)


if __name__ == '__main__':
    _main()


### FIXED CODE ###

from collections import (
    Counter,
)


def input_ints():
    return list(map(int, input().strip().split()))


def _main():
    n = input_ints()[0]
    xy = [input_ints() for _ in range(n)]

    if len(xy) == 1:
        print(1)
        return

    (_, count), = Counter(
        (x1 - x2, y1 - y2)
        for (x1, y1) in xy
        for (x2, y2) in xy
        if not (x1 == x2 and y1 == y2)
    ).most_common(1)

    print(len(xy) - count)


if __name__ == '__main__':
    _main()