Harryxun/stf_run huggingface dataset:
x = int(input())
b_p = 0
b_m = 0

def div(n):
    divs = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divs.append(i)
            if i != n // i:
                divs.append(n//i)
    divs
    divs += list(map(lambda x: x*(-1), divs))
    return divs

divs = div(x)
while True:  
    for i in divs:
        a_p = i + b_p
        a_m = i + b_m
        if a_p ** 5 == x + b_p ** 5:
            print(a_p, b_p)
            exit(1)
        if a_m ** 5 == x + b_m ** 5:
            print(a_m, b_m)
            exit(1)
    b_p += 1
    b_m -= 1

### FIXED CODE ###

import sys

x = int(input())
b_p = 0
b_m = 0

def div(n):
    divs = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divs.append(i)
            if i != n // i:
                divs.append(n//i)
    divs
    divs += list(map(lambda x: x*(-1), divs))
    return divs

divs = div(x)
while True:  
    for i in divs:
        a_p = i + b_p
        a_m = i + b_m
        if a_p ** 5 == x + b_p ** 5:
            print(a_p, b_p)
            sys.exit()
        if a_m ** 5 == x + b_m ** 5:
            print(a_m, b_m)
            sys.exit()
    b_p += 1
    b_m -= 1
import sys
input = sys.stdin.readline
N = int(input())
A = [int(input()) for _ in range(N)]
B = sorted(A, reverse = True)

for i in range(N):
    if A[i] == B[0]:
        print(B[1])
    else:
        print(B[0])


### FIXED CODE ###

r = int(input())
print(3*r*r)
N = int(input())
a = [int(i) for i in input().split()]
i = 0
b = []
while i <= 100000:
  n = a.count(i)
  b.append(n)
  i += 1
l = len(b)
j = 1
c = []
while j < l:
  nn = b[j-1]+b[j]+b[j+1]
  c.append(nn)
  j += 1
print(max(c))

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
dic = {}
for nums in A:
  if nums in dic:
    dic[nums] += 1
  else:
    dic[nums] = 1
  if nums-1 in dic:
    dic[nums-1] += 1
  else:
    dic[nums-1] = 1
  if nums+1 in dic:
    dic[nums+1] += 1
  else:
    dic[nums+1] = 1
b = list(dic.values())
print(max(b))
N = int(input())
a = list(map(int, input().split()))

cnt = [0]*(int(1e9)+1)
for ai in a:
    cnt[ai] += 1

ans = 0
condi = 0
for ai in a[::-1]:
    if cnt[ai] >= 4:
        ans = max(ans, ai*ai)
        break
    else:
        if condi==0:
            condi = ai
        else:
            ans = condi * ai
            break
            
print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
A = sorted(A)[::-1]
cur = A[0]
cnt = 0
ans = []
for ai in A:
    if ai==cur: cnt += 1
    else: 
        cur = ai
        cnt = 1
    if cnt==2 or cnt==4:
        ans.append(cur)
    if len(ans)==2:
        print(ans[0]*ans[1])
        break
else:
    print(0)
# -*- coding: utf-8 -*-
x = int(input())

if x<=6:
    print(1)
    exit()
if x<=11:
    print(2)
    exit()

r = x%11
ret = x//11
if r<=6:
    print(2*ret+1)
elif t<=11:
    print(2*ret+2)
else:
    print(2*ret)


### FIXED CODE ###

# -*- coding: utf-8 -*-
x = int(input())

if x<=6:
    print(1)
    exit()
if x<=11:
    print(2)
    exit()

r = x%11
ret = x//11
if r==0:
    print(2*ret)
elif r<=6:
    print(2*ret+1)
elif r<=11:
    print(2*ret+2)
a=int(input())
b=[input() for i in range(a)]
c=[AC,WA,TLE,RE]
d=[]
for value in c:
  e=b.count(value)
  d.append([value x e\n])
print(d)  
  
  

### FIXED CODE ###

N = int(input())
s = [input() for i in range(N)]
for v in ['AC', 'WA', 'TLE', 'RE']:
  print('{0} x {1}'.format(v, s.count(v)))
N = int(input())
a = [int(i) for i in input().split()]


s = sum(a)
m = s - a[:1]
#print(m)
for i in range(2, N):
    b = sum(a[:i])
    c = s - b
    #print(b)
    #print(c)
    if m > (abs(b-c)):
        m = abs(b-c)
    else:
        break
print(m)

### FIXED CODE ###

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


s = sum(a)
m = pow(10, 20)
b = 0
for i in range(N-1):
    b += a[i]
    c = s - b
    #print(b)
    #print(c)
    if m > (abs(b-c)):
        m = abs(b-c)
    #print(a[i])
print(m)
from collections import deque

s = deque(input())
q = int(input())
rev = 0 # revが0のとき先頭、1のとき後尾

for _ in range(q):
    t = input().split()

    if len(t) == 1:
        rev ^= 1
    else:
        if rev == 1:
            if t[1] == '1':
                s.append(t[2])
            else:
                s.appendleft(t[2])
        else:
            if t[1] == '1':
                s.appendleft(t[2])
            else:
                s.append(t[2])

if rev == 1:
    s.reverse()

for i in range(len(word)):
    print(s[i],end='')

print()


### FIXED CODE ###

s = input()
q = int(input())

rev = 0
front = ""
back = ""
all_rev = 0

for i in range(q):
    t = input().split()

    # T_1 = 1の時
    if len(t) == 1:
        rev += 1
        all_rev += 1

    # T_1 = 2の時
    else:
        if rev%2 == 1:
            if t[1] == '1':
                back = back + t[2]
            else:
                front = t[2] + front
        else:
            if t[1] == '1':
                front = t[2] + front
            else:
                back = back + t[2]

# 反転するとき
if all_rev%2 == 1:
    s = s[::-1]
    front,back = back[::-1],front[::-1]

print(front + s + back)
from collections import Counter
from math import factorial as f
N, M = map(int, input().split())
a1, a2 = 2, M
a = []
while a2 != 1:
    if a2 % a1 == 0:
        a.append(a1)
        a2 //= a1
    else:
        a1 += 1
ca = Counter(a)
sa = sum(ca.values())
p = 1
for v in ca.values():
    p *= f(sa + v - 1) // (f(v) * f(sa - 1))
print(p * (f(N) // (f(sa) * f(N - sa))) % (10 ** 9 + 7))

### FIXED CODE ###

N, M = map(int, input().split())
a1, a2 = 2, M
a = {}
while (a1 - 1) ** 2 <= a2 or a1 == a2:
    if a2 % a1 == 0:
        a2 //= a1
        if a1 in a:
            a[a1] += 1
        else:
            a[a1] = 1
    else:
        a1 += 1
p = 1
if a2 != 1:
    a[a2] = 1
for v in a.values():
    tmp = 1
    for i in range(v):
        tmp = tmp * (v + N - 1 - i) // (i + 1)
    p *= tmp
print(p % (10 ** 9 + 7))
s,t=map(input().split())
ans=t+s
print(ans)

### FIXED CODE ###

s,t=input().split()
ans=t+s
print(ans)
S=sorted(list(input()))
if S[0]==S[1] and S[1]!=S[2] and S[2]=S[3]:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

S=sorted(list(input()))
if S[0]==S[1] and S[1]!=S[2] and S[2]==S[3]:
    print("Yes")
else:
    print("No")
N=int(input())
print('ABC' if N<1000 else 'A

### FIXED CODE ###

N=int(input())
print('ABC' if N<1000 else 'ABD')
import itertools
N, M, X = map(int, input().split())
C = []
A = dict()
for i in range(N):
    CA = list(map(int, input().split()))
    C.append(CA[0])
    for j in range(1, M+1):
        if j in A:
            A[j].append(CA[j])
        else:
            A[j] = [CA[j]]

cost = float("inf")

for i in range(1, N+1):
    for pm in itertools.permutations(list(range(1, N+1)), r=i):
        c = 0
        k = dict()
        for p in pm:
            c += C[p-1]
            if c > cost:
                break

            for m in range(1, M+1):
                if m in k:
                    k[m] += A[m][p - 1]
                else:
                    k[m] = A[m][p - 1]

        if min(k.values()) >= X:
            cost = min(cost, c)


if cost == float("inf"):
    print(-1)
else:
    print(cost)

### FIXED CODE ###

import itertools
N, M, X = map(int, input().split())
C = []
A = dict()
for i in range(N):
    CA = list(map(int, input().split()))
    C.append(CA[0])
    for j in range(1, M+1):
        if j in A:
            A[j].append(CA[j])
        else:
            A[j] = [CA[j]]

cost = float("inf")

for i in range(1, N+1):
    for pm in itertools.combinations(list(range(1, N+1)), r=i):
        c = 0
        k = dict()
        for p in pm:
            c += C[p-1]

            for m in range(1, M+1):
                if m in k:
                    k[m] += A[m][p - 1]
                else:
                    k[m] = A[m][p - 1]

        if min(k.values()) >= X:
            cost = min(cost, c)


if cost == float("inf"):
    print(-1)
else:
    print(cost)
N,A,B,C=map(int,input().split())

l=[int(input()) for i in range(N)]

INF=3000

def mp(c,a,b,c):
    if c==N:
        return abs(a-A)+abs(b-B)+abs(c-C)-30 if min(a,b,c)>0 else INF

    ret0=mp(c+1,a,b,c)
    ret1=mp(c+1,a+1,b,c)+10
    ret2=mp(c+1,a,b+1,c)+10
    ret3=mp(c+1,a,b,c+1)+10

    return min(ret0,ret1,ret2,ret3)

print(mp(0,0,0,0))


### FIXED CODE ###

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

l=[int(input()) for i in range(N)]

INF=3000

def mp(co,a,b,c):
    if co==N:
        return abs(a-A)+abs(b-B)+abs(c-C)-30 if min(a,b,c)>0 else INF

    ret0=mp(co+1,a,b,c)
    ret1=mp(co+1,a+l[co],b,c)+10
    ret2=mp(co+1,a,b+l[co],c)+10
    ret3=mp(co+1,a,b,c+l[co])+10

    return min(ret0,ret1,ret2,ret3)

print(mp(0,0,0,0))
n=int(input())
dat = list(map(int, input().split()))

boolean flag=True
int count = 0

while flag:
     for i in range(n):
         if dat[i]%2==1:
             break
             flag=False
          else:
              dat[i] = dat[i]/2
       count = count+1

print(count)
         


 
      
      
             


    
    
     
                

         
           




### FIXED CODE ###

import sys

def main():
    N = int(input())
    A = [int(_) for _ in input().split()]

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()
#OutPut
if S == "ABC":
    print("ARC")
else S == "ARC":
    print("ABC")

### FIXED CODE ###

S = input()

if S == "ABC":
    print("ARC")
else:
    print("ABC")
N = int(input())
A = list(map(int,input().split()))
P = []

S = sum(A)

snuke = 0
ans = 10 ** 9

for i in range(0,N - 1):
  snuke += A[i]
  ans = (S - 2 * snuke)
  
  if ans >= dif:
    ans = dif
    
print(ans)
  

### FIXED CODE ###

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

S = sum(A)

snuke = 0
ans = 10 ** 12

for i in range(N - 1):
  snuke += A[i]
  dif = abs(S - (2 * snuke))
  
  if ans >= dif:
    ans = dif
    
print(ans)
def E(n):
  return n*(1+n)/2/n

n, k = map(int, input().split())
l = list(map(int, input().split()))
ex = []
exsum = [0] *20000

tmpmax = 0
for i in range(n):
  ex.append(E(l[i]))

for i in range(n-k+1):
  if i == 0:
    for j in range(k):
      tmpmax += ex[i+j]
      exsum[i] = tmpmax
  else:
    exsum[i] = exsum[i-1] - ex[i-1] + ex[i+k-1]
  
a = exsum.index(max(exsum))

print(exsum[a])



### FIXED CODE ###

def E(n):
  return n*(1+n)/2/n

n, k = map(int, input().split())
l = list(map(int, input().split()))
ex = []
exsum = [0] *300000

tmpmax = 0
for i in range(n):
  ex.append(E(l[i]))

for i in range(n-k+1):
  if i == 0:
    for j in range(k):
      tmpmax += ex[i+j]
      exsum[i] = tmpmax
  else:
    exsum[i] = exsum[i-1] - ex[i-1] + ex[i+k-1]
  
a = exsum.index(max(exsum))

print(exsum[a])
N=int(input())
for i in range(26) :
  if N=>4 and (N-(4*i))%7==0 :
    print("Yes")
    break
else :
  print("No")

### FIXED CODE ###

N=int(input())
for i in range(26) :
  if  N >= 4*i and (N-(4*i))%7==0 :
    print("Yes")
    break
else :
  print("No")
num = int(input())
array = [int(input()) for i in range(num)]

print (min(array), max(array), sum(array))

### FIXED CODE ###

num = int(input())
array = list(map(int, input().split()))

print (min(array), max(array), sum(array))
n=int(input())
total=0
l = list(range(2,n+1)) + [1]
for i in range(n):
  total+=(i+1)%l[i]
print(total)

### FIXED CODE ###

n=int(input())
#total=0
#l = list(range(2,n+1)) + [1]
#for i in range(n):
#    total+=(i+1)%l[i]
#print(total)
# 1+2+3+...+n-1
print(n*(n-1)//2)
S=str(input())
x=S.count('o')
prnit(700+x*100)

### FIXED CODE ###

S=str(input())
x=S.count('o')
print(700+x*100)
s = ['2017', '/', '01', '/', '07']
print(s.pop[2017])
print(s.append[2018])

### FIXED CODE ###

s = input()
print('2018' + s[4:])
a = input().split()
r = 0
for i in a:
    r += 1 / i
print(1/r)

### FIXED CODE ###

d = input()
a = input().split()
r = 0
for i in a:
    r += 1 / int(i)
print(1 / r)
import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int,input().split()))
re = 0
re2 = 0

for i in range(n):
    re += a[i]*sum(a[i+1:])
    #for m in range(n-i-1):
        #re = a[i]*a[i+m+1]
        #re2 += re

ans = re %1000000007
print(ans)

### FIXED CODE ###

d,t,s =map(int,input().split())
if d/s <=t :
    print('Yes')
else :
    print('No')
h, n = map(int, input().split())
magic = []
INF = 10 ** 9
for i in range(n):
    a, b = map(int, input().split())
    magic.append((a, b))
ans = 0
dp = [float('inf')] * (h + 1)

# 入力: 体力, 出力: 魔力の最小値
def magic_cost(hp):
    if dp[hp] != float('inf'):
        return dp[hp]

    cost_min = float('inf')
    for a, b in magic:
        if a >= hp:
            cost = b
        else:
            cost = b + magic_cost(hp - a)
        cost_min = min(cost, cost_min)
    dp[hp] = cost_min
    return cost_min

print(magic_cost(h))


### FIXED CODE ###

h, n = map(int, input().split())
magic = []
a_max = 0
for i in range(n):
    a, b = map(int, input().split())
    a_max = max(a, a_max)
    magic.append((a, b))

dp = [float('inf')] * (h + a_max)
dp[0] = 0
for i in range(h):
    for a, b in magic:
        if i + a > h + a_max:
            continue
        dp[i + a] = min(dp[i] + b, dp[i + a])

print(min(dp[h:]))
x, y = map(int,input().split())
A = [1,3,5,7,8,10,12]
B = [4,6,9,11]
C = [2]
if x in A:
    X = 'A'
if x in B:
    X = 'B'
if x in A:
    X = 'C'
if y in A:
    Y = 'A'
if y in B:
    Y = 'B'
if y in A:
    Y = 'C'
print('Yes' if X==Y else 'No')


### FIXED CODE ###

x, y = map(int,input().split())
A = [1,3,5,7,8,10,12]
B = [4,6,9,11]
C = [2]
if x in A:
    X = 'A'
if x in B:
    X = 'B'
if x in C:
    X = 'C'
if y in A:
    Y = 'A'
if y in B:
    Y = 'B'
if y in C:
    Y = 'C'
print('Yes' if X==Y else 'No')
n, m, l = map(int, input().split())
abc = [tuple(map(int,input().split())) for i in range(m)]
q = int(input())
st = [tuple(map(int,input().split())) for i in range(q)]

lmod = 10^len(str(l))

def warshall_floyd(dp):
    #d[i][j]: iからjへの最短距離 + lmod * 補給回数
    for k in range(n):
        for i in range(n):
            for j in range(n):
                dp[i][j] = min(dp[i][j],dp[i][k] + dp[k][j])
                if dp[i][j]%lmod >= l:
                    dp[i][j] = dp[i][j] - l + lmod 

    return dp


dp = [[float('inf') for i in range(n)] for i in range(n)] 
for a,b,c in abc:
    a = a - 1
    b = b - 1
    if c > l:
        c = float('inf')     
    
    dp[a][b] = c
    dp[b][a] = c
for i in range(n):
    dp[i][i] = 0

dp_ = warshall_floyd(dp)



for s,t in st:
    s = s-1
    t = t-1
    if dp_[s][t] == float('inf'):
        print(-1)
    else:
        print(dp_[s][t]//lmod)


### FIXED CODE ###

import sys
input = sys.stdin.readline

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

def warshall_floyd(dp):
    for k in range(n):
        for i in range(n):
            for j in range(n):
                dp[i][j] = min(dp[i][j] , dp[i][k] + dp[k][j])
    return dp

dp = [[float('inf')]*n for _ in range(n)]

for _ in range(m):
    a, b, c = map(int,input().split())
    dp[a-1][b-1] = dp[b-1][a-1] = c

for i in range(n):
    dp[i][i] = 0

dp = warshall_floyd(dp)

dp2 = [[float('inf')]*n for _ in range(n)]

for i in range(n):
    for j in range(n):
        if dp[i][j] <= l:
            dp2[i][j] = 1
    dp2[i][i] = 0
dp2 = warshall_floyd(dp2)

q = int(input())

ans = [0]*q
for i in range(q):
    s, t = map(int,input().split())
    tmp = dp2[s-1][t-1]
    ans[i] = -1 if tmp == float('inf') else tmp - 1

print(*ans, sep='\n')
a=input()
if a[0]=a[1]=a[2] or a[1]=a[2]=a[3]:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

a=list(input())
if a[0]==a[1]==a[2] or a[1]==a[2]==a[3]:
    print("Yes")
else:
    print("No")
a,b=map(int,input())
print('Even'if((a*b)&1==0)else'Odd')

### FIXED CODE ###

a,b=map(int,input().split())
print('Even' if a*b%2==0 else 'Odd')
if x < 1200:
  print("ABC")
else:
  print("ARC")

### FIXED CODE ###

x = int(input())

if x < 1200:
    print("ABC")
else:
    print("ARC")
s = input()
t = input()

if (s == t[:-1] & len(s) + 1 == len(t):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

s = input()
t = input()

if (s == t[:-1]) & (len(s) + 1 == len(t)):
    print("Yes")
else:
    print("No")
import sys
n = int(input())
a = list(map(int, input().split(' ')))

a.sort()
if n%2 == 0:
    for i in range(n-1):
        if i%2 == 0:
            if a[i] == a[i+1]:
                continue
            else:
                print(0)
                sys.exit()
        else:
            if a[i]+2 == a[i+1]:
                continue
            else:
                print(0)
                sys.exit()
    print((2 ** (n//2)) % (10**9+7))
else:
    if a[0] == 0:
        for i in range(1, n-1):
            if i%2 == 1:
                if a[i] == a[i+1]:
                    continue
                else:
                    print(0)
                    sys.exit()
            else:
                if a[i]+2 == a[i+1]:
                    continue
                else:
                    print(0)
                    sys.exit()
        print(2**((n-1)/2)%(10**9+7))
    else:
        print(0)
        sys.exit()

### FIXED CODE ###

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

a.sort()
if n%2 == 0:
    for i in range(n-1):
        if i%2 == 0:
            if a[i] == a[i+1]:
                continue
            else:
                print(0)
                sys.exit()
        else:
            if a[i]+2 == a[i+1]:
                continue
            else:
                print(0)
                sys.exit()
    result = 2 ** (n//2)
    print(result % (10**9+7))
else:
    if a[0] == 0:
        for i in range(1, n-1):
            if i%2 == 1:
                if a[i] == a[i+1]:
                    continue
                else:
                    print(0)
                    sys.exit()
            else:
                if a[i]+2 == a[i+1]:
                    continue
                else:
                    print(0)
                    sys.exit()
        result = 2**((n-1)//2)
        print(result %(10**9+7))
    else:
        print(0)
        sys.exit()
def SME():
    A = [[x,i] for i,x in enumerate(Whole)]
    A.sort()
    i = 1
    while i < len(A) - 1:
        if A[i+1][1]-A[i-1][1] < L :
            if A[i+1][0]==A[i-1][0] :
                del A[i]
                continue
        i += 1
    C = set([i for i in range(N)])
    D = set([])
    parameter = 0.997
    count = 0
    ANS = [None] * N
    for j in range(N) :
        a = A[j]
        for i,x in enumerate(ANS[a[1]:a[1]+L]):
            if x : continue
            else :
                ANS[a[1]+i] = a[0]
                D.add(a[1]+i)
                count += 1
        if count > N * parameter : break
    for i in C.difference(D):
        if i < L : ANS[i] = min(Whole[:i+1])
        else : ANS[i] = min(Whole[i+1-L:i+1])
    return ANS

[N,L] = [int(x) for x in input().split()]
Whole = [int(x) for x in input().split()]
if N != 10 ** 5:
    ANS = SME()
for i in ANS[L-1:-1]:print(i, end=" ")
print(ANS[-1])

### FIXED CODE ###

def ascend(a,b):
    mini = min(A[a:a+L])
    ans[a] = mini
    for i in range(a+1,b):
        if A[i+L-1] <= mini : mini = A[i+L-1]
        elif A[i-1] == mini : mini = min(A[i:i+L])
        ans[i] = mini

def descend(a,b):
    mini = min(A[b-1:b+L-1])
    ans[b-1] = mini
    for i in range(b-2,a-1,-1):
        if A[i] <= mini : mini = A[i]
        elif A[i+L] == mini: mini = min(A[i:i+L])
        ans[i] = mini
    
[N,L] = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
ans = [None]*(N-L+1)
count = 0;
if N > 10 ** 4:
    for i in range(100):
        if A[i+1] > A[i] : count += 1
    if count > 80 : descend(0, N-L+1)
    else : ascend(0,N-L+1)
else :
    ascend(0, N-L+1)
for i in ans[:-1] : print(i, end=" ")
print(ans[-1])
n = int(input())
a = []
for _ in range(n):
    a.append(int(input()))
tmp = sorted(a)
mx = max(a)
cnt = a.count(mx)

for t in a:
    if t == mx and -cnt-1 < len(a):
        print(tmp[-cnt-1])
    else:
        print(mx)        

### FIXED CODE ###

n = int(input())
a = []
for _ in range(n):
    a.append(int(input()))
b = a[:]
mx = max(b)
b.remove(mx)
mx2 = max(b)

for t in a:
    if t == mx:
        print(mx2)
    else:
        print(mx)
N = int(input())
graph = [[] for  _ in range(N)]
for _ in range(N-1):
    x,y,w = map(int,input().split())
    x -= 1
    y -= 1
    graph[x].append((y,w))
    graph[y].append((x,w))
    


vis = [0 for _ in range(N)]

even = set()
odd = set()

def dfs(now):
    for nv in graph[now]:
        if vis[nv[0]]: continue
        if nv[1] % 2 == 0:
            if nv in even:
                even.add(nv[1])
            else:
                odd.add(nv[1])
        else:
            if nv in even:
                odd.add(nv[1])
            else:
                even.add(nv[1])
        vis[nv[0]] = 1
        dfs(nv[0])
vis[0] = 1
even.add(0)
dfs(0)
for i in range(N):
    if i in even:
        print(1)
    else:
        print(0)



### FIXED CODE ###

N = int(input())
graph = [[] for  _ in range(N)]
now = 0
for _ in range(N-1):
    x,y,w = map(int,input().split())
    x -= 1
    y -= 1
    graph[x].append((y,w))
    graph[y].append((x,w))
    now = x
    
vis = [0 for _ in range(N)]

even = set()
odd = set()
import sys
sys.setrecursionlimit(10000000)


def dfs(now):
    #print(now)
    for nv in graph[now]:
        if vis[nv[0]]: continue
        if nv[1] % 2 == 0:
            if now in even:
                even.add(nv[0])
            else:
                odd.add(nv[0])
        else:
            if now in even:
                odd.add(nv[0])
            else:
                even.add(nv[0])
        vis[nv[0]] = 1
        dfs(nv[0])
vis[x] = 1
even.add(x)
dfs(x)

for i in range(N):
    if i in even:
        print(1)
    else:
        print(0)
n, m = map(int,input().split())
drink = []
for i in range(n):
  drink.append(list(map(int,input().split())))
sorteddrink = sorted(drink, key = lambda x:x[0])

count = 0
cost = 0
index = 0

while True:
  if index > n - 1:
    break
  if count + sorteddrink[index][1] > m:
    break
  cost += sorteddrink[index][0] * sorteddrink[index][1]
  count += sorteddrink[index][1]
  index += 1

cost += sorteddrink[index][0] * (m - count)
print(cost)

### FIXED CODE ###

n, m = map(int,input().split())
drink = []
for i in range(n):
  drink.append(list(map(int,input().split())))
sorteddrink = sorted(drink, key = lambda x:x[0])

count = 0
cost = 0
index = 0

while True:
  if index > n - 1:
    break
  if count + sorteddrink[index][1] > m:
    break
  cost += sorteddrink[index][0] * sorteddrink[index][1]
  count += sorteddrink[index][1]
  index += 1

if index <= n - 1:
  cost += sorteddrink[index][0] * (m - count)
print(cost)
import sys
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return int(input())
from collections import defaultdict, Counter
import bisect

sys.setrecursionlimit(10000000)

n = SI()
xy = [(0,0) for _ in range(n)]
div = defaultdict(int)
for i in range(n):
    x, y = LI()
    xy[i] = (x, y)
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        else:
            div["{}_{}".format(xy[i][0] - xy[j][0], xy[i][1]- xy[j][1])] += 1

max_ = max(div.values())
print(n - max_)

### FIXED CODE ###

import sys
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return int(input())
from collections import defaultdict, Counter
import bisect

sys.setrecursionlimit(10000000)

n = SI()
xy = [(0,0) for _ in range(n)]
div = defaultdict(int)
for i in range(n):
    x, y = LI()
    xy[i] = (x, y)
if n==1:
    print(1)
else:
    for i in range(n):
        for j in range(n):
            if i == j:
                continue
            else:
                div["{}_{}".format(xy[i][0] - xy[j][0], xy[i][1]- xy[j][1])] += 1

    max_ = max(div.values())
    print(n - max_)