Harryxun/stf_run huggingface dataset:
n = input()
l = len(n)

for i in range(2**l):
    op=["-"]*l
    for j in range(l):
        if (i>>j)&1:
            op[l - j - 1] = "+" #なぜ i - j - 1 ではなく、l - j - 1なのか、決まっている数から引いたものが知りたい
    formula = ""
    for op1,op2 in zip(n,op): #式の文字列を作るループ
        formula += op1 + op2
    if eval(formula)==7:
        print(formula + "=7")
        break

### FIXED CODE ###

def dfs(i, Str, res):
    if i==3:
        if res==7:
            print(Str+"=7")
            exit()
        return
    
    dfs(i+1,Str+"+"+s[i+1],res+int(s[i+1]))
    dfs(i+1,Str+"-"+s[i+1],res-int(s[i+1]))

s=input()
dfs(0,s[0],int(s[0]))
from collections import defaultdict
import sys
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7
input = sys.stdin.readline


def inp():
    return int(input())


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


X = inp()

for a in range(-100, 100):
    for b in range(-100, 100):
        tmp = a**5 - b**5
        if X == tmp:
            print(a, b)
            exit()


assert False


### FIXED CODE ###

from collections import defaultdict
import sys
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7
input = sys.stdin.readline


def inp():
    return int(input())


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


X = inp()
MAX = 5000
for a in range(-MAX, MAX + 1):
    for b in range(-MAX, MAX + 1):
        tmp = pow(a, 5) - pow(b, 5)
        if X == tmp:
            print(a, b)
            exit()


assert False
x=[int(x) for i in input().split()]
if x[0]==x[1]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

x=[int(k) for k in input().split()]
if x[0]==x[1]:
  print("Yes")
else:
  print("No")
S = int(input())
h = S//3600
m = (S-3600*h)//60
s = S-3600*h-60*m
print(str(h)+":"+str(m)+":"+s

### FIXED CODE ###

S = int(input())
h = S//3600
m = (S-3600*h)//60
s = S-3600*h-60*m
print(str(h)+":"+str(m)+":"+str(s))
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b = map(int, readline().split())
print(a*b)

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

a, b, c = map(int, readline().split())

print('Yes' if (a+b) >= c else 'No')
i=input
r=range
N=int(i())
A=(int(i()) for _ in r(N))
mp=A[1]-A[0]
mn=A[0]
for a in r(1,N):
    x=A[a]
    b=x-mn
    if mp<(b):mp=b
        if 0>b:mn=x
    if x<mn:mn=x
print(mp)

### FIXED CODE ###

import sys
i=input
n=int(i())
r0=int(i())
r1=int(i())
x=r1-r0
y=min(r1,r0)
for i in map(int,sys.stdin.readlines()):
    a=i-y
    if x<a:
        x=a
        if 0>a:y=i
    elif y>i:y=i
print(x)
def solve():
    a, b = list(map(int, input().split(" ")))
    
    if a == b:
        print("H")
    else:
        print("D")


solve()

### FIXED CODE ###

def solve():
    a, b = list(map(str, input().split(" ")))

    if a == b:
        print("H")
    else:
        print("D")


solve()
N,K = map(int,input().split())
list = [int(input()) for _ in range(N)]
list.sort()

def dfs(start,cnt):
    if cnt <= 0:
        return float('inf')
    diff = max(list[start:start+K]) - min(list[start:start+K])
    return min(diff,dfs(start+1,cnt-1))

print(dfs(0,K))

### FIXED CODE ###

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

list = [int(input()) for i in range(N)]
list.sort()
min_val = 10**9
for i in range(N-K+1):
    min_val = min(min_val,list[i+K-1]-list[i])

print(min_val)
N = int(input())
x = [0] * N
y = [0] * N
for i in range(N):
    x[i], y[i] = list(map(int, input().split()))

l = {}

for i in range(N):
    for j in range(i + 1, N):
        p = x[i] - x[j]
        q = y[i] - y[j]
        if p < 0:
            p = -p
            q = -q
        if str([p, q]) in l:
            l[str([p, q])] += 1
        else:
            l[str([p, q])] = 1

print(N - max(l.values()))



### FIXED CODE ###

N = int(input())
if N == 1:
    print(1)
    exit()

x = [0] * N
y = [0] * N
for i in range(N):
    x[i], y[i] = list(map(int, input().split()))

l = {}

for i in range(N):
    for j in range(i + 1, N):
        p = x[i] - x[j]
        q = y[i] - y[j]
        if p < 0:
            p = -p
            q = -q
        if p == 0:
            q = abs(q)
        if str([p, q]) in l:
            l[str([p, q])] += 1
        else:
            l[str([p, q])] = 1

print(N - max(l.values()))
from sys import stdin

a = [int(i) for i in stdin.readline().rstrip().split(' ')]

min = min([a[0], a[1]])
max = max([a[0], a[1]])

k = 0
res 
for i in reversed(range()):
  if max % (i+1)==0:
    k += 1
    if k == a[2]:
      print(k)
      break

### FIXED CODE ###

from sys import stdin

a = [int(i) for i in stdin.readline().rstrip().split(' ')]

min = min([a[0], a[1]])
max = max([a[0], a[1]])

k = 0
for i in list(reversed(range(1, min + 1))):
    if max % i == 0 and min % i == 0:
        k += 1
        if k == a[2]:
            print(i)
            break
N = int(input())
M = int(input())
X = int(input())
Y = int(input())

x = [input() for i in range(N)]
y = [input() for i in range(M)]

x.sort(reverse=True)
y.sort()

if x[0] < y[0]:
    print("No War")
else:
    print("War")

### FIXED CODE ###

N, M, X, Y = list(map(int, input().split()))

x = list(map(int, input().split()))
y = list(map(int, input().split()))

x.append(X)
y.append(Y)

x.sort(reverse=True)
y.sort()

if x[0] < y[0]:
    print("No War")
else:
    print("War")
def rec(i):
    if dp[i] < INF:
        return dp[i]
    if i == 0:
        return 0
    dp[i] = min(dp[i], rec(i-1) + abs(h[i] - h[i - 1]))
    if i > 1:
        dp[i] = min(dp[i], rec(i-2) + abs(h[i] - h[i - 2]))
    return dp[i]


INF = float('inf')
dp = [INF] * (10 ** 5 + 10)
h = [0] * (10 ** 4 + 10)

N = int(input())
h = list(map(int, input().split())) + h

print(rec(N-1))



### FIXED CODE ###

n = int(input())
h = list(map(int, input().split()))
INF = float('inf')
dp = [INF] * (1 + 10 ** 5)
dp[0] = 0
for i in range(n):
    dp[i] = min(dp[i], dp[i - 1] + abs(h[i] - h[i - 1]))
    if i < 2:
        continue
    dp[i] = min(dp[i], dp[i - 2] + abs(h[i] - h[i - 2]))
print(dp[n-1])
while True:
    s = input()
    if s == '-':
        break

    n = int(input())
    for mi in range(m):
        h = int(input())

        s = s[h:] + s[:h]

    print(s)

### FIXED CODE ###

while True:
    s = input()
    if s == '-':
        break

    m = int(input())
    for mi in range(m):
        h = int(input())

        s = s[h:] + s[:h]

    print(s)
N=int(input())
S=input()

count=0
for i in range(0,N):
    if(S[i]=="A"):
        if(S[i+1]=="B"):
            if(S[i+2]=="C"):
                count+=1

print(count)
        

### FIXED CODE ###

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

count=0
for i in range(0,N):
    if(S[i]=="A"):
        if(i<=N-3):
            if(S[i+1]=="B"):
                if(S[i+2]=="C"):
                    count+=1

print(count)
N=input()
A=input()
B=N%500

if(int(B)-int(A)==0):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

N=int(input())
A=int(input())
N!=0
B=int(N%500)
if(B <= A):
    print("Yes")
else:
    print("No")
import sys

H, W = map(int, input().split())
S = [list(input()) for i in range(H)]
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]

for i in range(H):
    for j in range(W):
        if(S[i][j]=="."):
            continue
        exist = False
        for k in range(4):
            if(not 0<=i+dy[k]<H or not 0<=j+dx[k]<W):
                continue
            if(S[i+dy[k]][j+dx[k]]=="#"):
                exist = True
        if(exist==False):
            print("No")
            sys.exit()     
if(exist==True):
    print("Yes")

### FIXED CODE ###

import sys

H, W = map(int, input().split())
S = [list(input()) for i in range(H)]
dx = [-1, 0, 1, 0]
dy = [0, -1, 0, 1]

for i in range(H):
    for j in range(W):
        if(S[i][j]=="."):
            continue
        exist = False
        for k in range(4):
            if(0<=i+dy[k]<H and 0<=j+dx[k]<W and S[i+dy[k]][j+dx[k]]=="#"):
                exist = True
        if(exist==False):
            print("No")
            sys.exit()     
print("Yes")
N, M = map(int,input().split())
A = [list(map(int,input().split())) for _ in range(m)]

b = [0]*N

ans = 0
for i in range(N):
    print(A[i][0])
    if b[A[i][0]-1] ==0:
        b[A[i][0]-1] = A[i][1]
    elif b[A[i][0]-1] == A[i][1]:
        pass
    else:
        ans = -1
        break

s = ''.join([str(N) for N in b])

if ans == 0:
    print(s)
else:
    print(s)

### FIXED CODE ###

n,m = map(int,input().split())
a=[list(map(int,input().split())) for _ in range(m)]
for i in range(10**n):
    if len(str(i))==n:
        x=str(i)
        for b,c in a:
            if int(x[b-1])!=c:
                break
        else:
            print(i)
            exit()
print(-1)
N = int(input())
S = list(map(str,input().split()))
p = S.count("P")
w = S.count("W")
g = S.count("G")
y = S>count("Y")
ans = p+w+g+y
if ans == 3 :
    print("Three")
else :
    print("Four")
    

### FIXED CODE ###

N = int(input())
L = list(map(str,input().split()))
flag = 4
if "P" in L :
    flag -= 1
if "W" in L :
    flag -= 1
if "G" in L :
    flag -= 1
if "Y" in L :
    flag -= 1
if flag == 0 :
    print("Four")
else :
    print("Three")
import numpy as np

def main():
    h, w, k = map(int, input().split())
    s = np.array([[int(i) for i in list(input())] for _ in range(h)])
    cnt = [0] * 2**(h - 1)
    for i in range(2**(h - 1)):
        ss = np.split(s, [i & 2**j for j in range(h - 1) if i & 2**j > 0])
        cnt[i] += bin(i).count("1")
        l = 0
        for j in range(1, w + 1):
            if max(si[:, l:j].sum() for si in ss) > k:
                l = j - 1
                cnt[i] += 1
    print(min(cnt))

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    h, w, k = map(int, input().split())
    s = [[int(i) for i in list(input())] for _ in range(h)]
    cnt = [bin(i).count("1") for i in range(2**(h - 1))]
    c = 0
    for ci in [sum(i) for i in zip(*s)]:
        if ci > k:
            cnt[0] = 100000
            break
        c += ci
        if c > k:
            cnt[0] += 1
            c = ci
    for i in range(1, 2**(h - 1)):
        div = [j + 1 for j in range(h) if i & 2**j]
        ss = []
        l = 0
        for d in div:
            ss.append(s[l:d])
            l = d
        ss.append(s[l:])
        c = [0] * len(ss)
        t = [[sum(i) for i in zip(*si)] for si in ss]
        for j in range(w):
            if max(ti[j] for ti in t) > k:
                cnt[i] = 100000
                break
            for tt, ti in enumerate(t):
                c[tt] += ti[j]
            if max(c) > k:
                cnt[i] += 1
                c = [ti[j] for ti in t]
    print(min(cnt))

if __name__ == '__main__':
    main()
from scipy.special import comb

n,k = map(int,input().split())
mod = 10**9 + 7

for i in range(k):
    print(comb(k-1,i,exact=True) * comb(n-k+1,i+1,exact=True) % mod)


### FIXED CODE ###

from scipy.misc import comb

n,k = map(int,input().split())
mod = 10**9 + 7

for i in range(k):
    print(comb(k-1,i,exact=True) * comb(n-k+1,i+1,exact=True) % mod)
mat = []
 
for i in range(3):
  a = list(map(int, input().split()))
 
ans = False
if mat[1][0] - mat[0][0] == mat[1][1] - mat[0][1] and mat[1][1] - mat[0][1] == mat[1][2] - mat[0][2]:
  if mat[2][0] - mat[0][0] == mat[2][1] - mat[0][1] and mat[2][1] - mat[0][1] == mat[2][2] - mat[0][2]:
    ans = True
 
if ans:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

mat = []
 
for i in range(3):
  a = list(map(int, input().split()))
  mat.append(a)
  
ans = False
if mat[1][0] - mat[0][0] == mat[1][1] - mat[0][1] == mat[1][2] - mat[0][2]:
  if mat[2][0] - mat[0][0] == mat[2][1] - mat[0][1] and mat[2][1] - mat[0][1] == mat[2][2] - mat[0][2]:
    ans = True
 
if ans:
  print("Yes")
else:
  print("No")
a,b,c,d,e,f=map(int,input().split())
f//=100
a=0
ans=[0,0]
for i in range(0,f+1,a):
  for j in range(0,f+1-i,b):
    for k in range(0,e*(i+j)+1,c):
      for l in range(0,e*(i+j)+1-k,d):
        if i+j+k+l>f:
          continue
        if a<(k+j)/(i+j):
          a=(k+j)/(i+j)
          ans=[i+j+k+l,k+l]
print(ans[0],ans[1])
        

### FIXED CODE ###

a,b,c,d,e,f=map(int,input().split())
aa=-1
ans=[0,0]
for i in range(0,f+1,a*100):
  for j in range(0,f+1-i,b*100):
    for k in range(0,int(e*(i+j)/100)+1,c):
      for l in range(0,int(e*(i+j)/100)+1-k,d):
        if i+j+k+l>f:
          continue
        if i+j>0 and aa<(k+l)/(i+j+k+l):
          aa=(k+l)/(i+j+k+l)
          ans=[i+j+k+l,k+l]
print(ans[0],ans[1])
n, m = map(int, input().split())
x = list(map(int, input().split()))

y = []
for i in range(m):
    y+= [x[i+1] - x[i]]
    
y.sort()

print(sum(y[:max(m-n, 0)]))

### FIXED CODE ###

T, X = map(int,input().split())

print(T / X)
n = int(input())
ok = False
for i in range(n):
  t = input()
  if(t == 'Y'):
    ok = True
    break
    
if(ok):
  print('Four')
else:
  print('Three')

### FIXED CODE ###

n = int(input())
t = 'Y'
x = input().split()
    
if(t in x):
  print('Four')
else:
  print('Three')
s = input()
a = []
for i in range(len(str(s))-2):
  a.extend(abs(inst(s[i])*100+int(s[i+1])*10+int(s[i+2])-753))
print(min(a))

### FIXED CODE ###

s = input()
a = []
for i in range(len(s)-2):
  a.append(abs(int(s[i])*100+int(s[i+1])*10+int(s[i+2])-753))
print(min(a))
N, M = (int(i) for i in input().split())
a = []
b = []
for i in range(N):
    data = list(input())
    a.append(data)
for i in range(M):
    data = list(input())
    b.append(data)

#N=4
#M=2
#a=[['a','s','a','s'],['a','a','s','s'],['s','a','a','s'],['s','a','a','a']]
#b=[['s','a'],['a','s']]

L = N-M

def check(i,j):
    ans=True
    for line in range(M):
        if (ans==False):
            break
        for row in range(M):
            if (a[i+line][j+row]!=b[line][row]):
                ans=False
                break
    return ans

ans=False
for i in range(L+1):
    if(ans==True):
        break
    for j in range(L+1):
        ansnow=check(i,j)
        print(ansnow,i,j)
        if(ansnow==True):
            ans=True
            break
if(ans==True):
    print('Yes')
else:
    print('No')
    


### FIXED CODE ###

a, b = (int(i) for i in input().split())

if a==1:
    a=14
if b==1:
    b=14

if a==b:
    print("Draw")
elif a>b:
    print("Alice")
else:
    print("Bob")
N, M = list(map(int, input().split()))
K = [int(input()) for i in range(N)]
K = sorted(K)
print(min([K[i+M-1]-K[i] for i in range(N-M+1)])

### FIXED CODE ###

N, M = list(map(int, input().split()))
K = [int(input()) for i in range(N)]
K = sorted(K)

result = 10 ** 10
for i in range(N-M+1):
  result = min([result, K[i+M-1]-K[i]])
  
print(result)
from collections import Counter

s = int(input())
a = [s]
def f_even(n):
    return n//2
def f_odd(n):
    return 3*n + 1
for i in range(100):
    if a[i]%2 == 0:
        a.append(f_even(a[i]))
    else:
        a.append(f_odd(a[i]))
    tmp = Counter(a).most_common()[0]
    if tmp[1] > 1:
        print(i+2)
        return

### FIXED CODE ###

s = int(input())
lst = []

while s not in lst:
    lst.append(s)
    s = s/2 if s%2==0 else 3*s + 1
    
print(len(lst) + 1)
a = [int(input()) for i in range(4)]
ans = ((a[0]+a[1]) * a[2]) / 2

print(str(ans))

### FIXED CODE ###

a = [int(input()) for i in range(3)]
ans = ((a[0]+a[1]) * a[2]) / 2

print(str(int(ans)))
a,b = input().split()
 
print(min(a*int(b),b*int(a) ) )
      


### FIXED CODE ###

a,b=map(int,input().split())
s=sum(map(int,input().split()))
print("Yes" if s>=a else "No")
from fractions import gcd
from functools import reduce
n = int(input())
a = list(map(int, input().split()))
print(reduce(gcd, numbers))

### FIXED CODE ###

from fractions import gcd
from functools import reduce
n = int(input())
a = list(map(int, input().split()))
def gcd_list(numbers):
    return reduce(gcd, numbers)
print(gcd_list(a))
line = input()
reversed(line)
print line

### FIXED CODE ###

line = raw_input().strip()
print reduce(lambda a, b: a + b, reversed(line))
a=list(map(int, input().split()))
l=[a[0]]
if a[0]==1 or a[1]==1:
    print(0)
    exit()
def d(a,b):
    if a<b:
        if min(l)>b-a:
            l.append(b-a)
            d(b-a,a)
        else:
            print(min(l))
            exit()
    elif b<a:
        if min(l)>a-b:
            l.append(a-b)
            d(a-b,b)
        else:
            print(min(l))
            exit()
    else:
        print(0)
        exit()
d(a[0],a[1])

### FIXED CODE ###

a=list(map(int, input().split()))
def d(a,b):
    _1=a%b
    _2=b-(a%b)
    if _1<_2:
        print(_1)
    else:
        print(_2)
d(a[0],a[1])
n = int(input())
k = int(input())
number = []
while n:
    number.append(n%10)
    n//=10

from math import factorial
def comb(n,k):
    if n>=k:
        return int(factorial(n)/(factorial(k)*factorial(n-k)))
    else:
        return 0


t = len(number)
t1 = len(number) - 1
#if t>k:
   # ans = (9**k)*comb(t1,k) + (9**(k-1))*(number[t1]-1)*comb(t1,k-1)
#else:
 #   ans = (9**(k-1))*(number[t1]-1)*comb(t1,k-1)



ans = 0
def calc(a,k):
    t = len(a)
    t1 = len(a) - 1
    if k<1:
        return 0
    else:
        if a[t1]>0: #and t>1:
            ans = (9**k)*comb(t1,k) + (9**(k-1))*(a[t1]-1)*comb(t1,k-1)
        #elif a[t1]>0 and t==1:
           # ans = a[t1]
        else:
            ans = 0
        ans+=calc(a[:(t-1)],k-1)
        return ans
ans += calc(number,k)
if ans>0:
    if number[-k]>=1:
        print(ans+1)
    else:
        print(ans)
else:
    print(0)

### FIXED CODE ###

from math import factorial
def comb(n,k):
    if n>=k:
        return int(factorial(n)/(factorial(k)*factorial(n-k)))
    else:
        return 0

n = int(input())
k = int(input())
number = []
while n:
    number.append(n%10)
    n//=10

t = len(number)
t1 = len(number) - 1

if t>=k:
    ans = 0
    def calc(a,k):
        t = len(a)
        t1 = len(a) - 1
        if k<1 or t == 0:
            return 0
        else:
            if a[t1]>0:
                ans = (9**k)*comb(t1,k) + (9**(k-1))*(a[t1]-1)*comb(t1,k-1)
                ans+=calc(a[:(t-1)],k-1)
            else:
                ans = 0
                ans+=calc(a[:(t-1)],k)
            if a[-k]>=1 and k == 1:
               ans+=1
            return ans
    ans += calc(number,k)
else:
    ans = 0
print(ans)
from collections import Counter
N = int(input())
A = [int(i) for i in input().split()]

c = Counter(A)
b = sorted(c.keys())

ret = 0

j = len(b) - 1
for j in range(N - 1, -1, -1) :
    i = 2
    while c[b[j]] > 0 and i - b[j] <= b[j] :
        if b[j] != i - b[j] :
            if c[b[j]] > 0 and c[i-b[j]] :
                M = max(c[b[j]], c[i-b[j]])
                ret += M
                c[b[j]] -= M
                c[i-b[j]] -= M
        else :
            if c[b[j]] > 1 :
                ret += c[b[j]] // 2
                c[b[j]] %= 2
        i *= 2
    
print(ret)

### FIXED CODE ###

from collections import Counter
N = int(input())
A = [int(i) for i in input().split()]

c = Counter(A)
b = sorted(c.keys())

ret = 0
for j in range(len(c) - 1, -1, -1) :
    i = 2
    while c[b[j]] > 0 and i - b[j] <= b[j] :
        if b[j] != i - b[j] :
            if c[b[j]] > 0 and c[i-b[j]] > 0 :
                M = min(c[b[j]], c[i-b[j]])
                ret += M
                c[b[j]] -= M
                c[i-b[j]] -= M
        else :
            if c[b[j]] > 1 :
                ret += c[b[j]] // 2
                c[b[j]] %= 2
        i *= 2
    
print(ret)
inp = list(input())
hard = 0
for number in range(0, 3) :
  if inp[number] == inp[number + 1] :
    hard = 1
    
if hard == 0 :
  print ("Good")
else :
  print ("Bad)

### FIXED CODE ###

inp = list(input())
hard = 0
for number in range(0, 3) :
  if inp[number] == inp[number + 1] :
    hard = 1
    
if hard == 0 :
  print("Good")
else :
  print("Bad")
print(eval(input())**3)

### FIXED CODE ###

print(int(input())**3)
import numpy as np
from functools import reduce


n,m=map(int,input().split())
A=list(map(lambda x: int(x)//2,input().split()))

lcm=np.lcm.reduce(np.array(A))
if any([i for i in range(n) if lcm%(A[i]*2)==0]):
    print(0);exit()

ans=m//(2*lcm)
print(ans if m//lcm==0 else ans+1)

### FIXED CODE ###

import fractions
from functools import reduce


n, m = map(int, input().split())
A = list(set(map(int, input().split())))

hA = [a//2 for a in A]
lcm = 1
for a in hA:
    lcm = (lcm * a) // fractions.gcd(lcm, a)
    if lcm > m:
        print(0)
        break
else:
    for a in A:
        if lcm % a == 0:
            print(0)
            break
    else:
        if (m//lcm) % 2 == 0:
            print(m//lcm//2)
        else:
            print(m//lcm//2 + 1)
N = int(input())
cnt = 0
for i in range(1,N+1):
  if len(str(i))%2 != :
    cnt+=1
print(cnt)

### FIXED CODE ###

N = int(input())
cnt = 0
for i in range(1,N+1):
  if len(str(i))%2 != 0:
    cnt+=1
print(cnt)
n, k, l = map(int, input().split())
a = [list() for _ in range(n)]
b = [list() for _ in range(n)]
for _ in range(k):
    p, q = [int(x) - 1 for x in input().split()]
    a[p].append(q)
    a[q].append(p)
for _ in range(l):
    r, s = [int(x) - 1 for x in input().split()]
    b[r].append(s)
    b[s].append(r)

def g(a, b, i, k):
    b[i] = k
    for e in a[i]:
        if b[e] is not None: continue
        g(a, b, e, k)

def f(a, b):
    k = 0
    for i in range(n):
        if b[i] is not None: continue
        g(a, b, i, k)
        k += 1

c = [None] * n
f(a, c)
d = [None] * n
f(b, d)
e = {}
for i in range(n):
    k = (c[i], d[i])
    e[k] = e.get(k, 0) + 1

print(' '.join([str(e[(c[i], d[i])]) for i in range(n)]))


### FIXED CODE ###

import sys
sys.setrecursionlimit(20000)

n, k, l = map(int, input().split())
a = [list() for _ in range(n)]
b = [list() for _ in range(n)]
for _ in range(k):
    p, q = [int(x) - 1 for x in input().split()]
    a[p].append(q)
    a[q].append(p)
for _ in range(l):
    r, s = [int(x) - 1 for x in input().split()]
    b[r].append(s)
    b[s].append(r)

def g(a, b, i, k):
    b[i] = k
    for e in a[i]:
        if b[e] is not None: continue
        g(a, b, e, k)

def f(a, b):
    k = 0
    for i in range(n):
        if b[i] is not None: continue
        g(a, b, i, k)
        k += 1

c = [None] * n
f(a, c)
d = [None] * n
f(b, d)
e = {}
for i in range(n):
    k = (c[i], d[i])
    e[k] = e.get(k, 0) + 1

print(' '.join([str(e[(c[i], d[i])]) for i in range(n)]))
from collections import defaultdict
from operator import sub

def main():
    N = int(input())
    balls = [tuple(map(int,input().split())) for _ in range(N)]
    d = defaultdict(int)
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            d[tuple(map(sub, balls[i], balls[j]))] += 1
    try:
        mmax = max(d.values())
        mmax = int(N - mmax)
        print(mmax)
    except UnboundLocalError:
        print(100)


if __name__ == '__main__':
    main()

### FIXED CODE ###

from collections import defaultdict
from operator import sub

def main():
    N = int(input())
    balls = [tuple(map(int,input().split())) for _ in range(N)]
    d = defaultdict(int)
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            d[tuple(map(sub, balls[i], balls[j]))] += 1
    try:
        mmax = N - max(d.values(), default=0)
        print(mmax)
    except ValueError:
        print(100)

if __name__ == '__main__':
    main()