Harryxun/stf_run huggingface dataset:
a,b,k=map(int,input().split())

count=0

for i range(1,max(a,b)+1)[::-1]

if a%i==0 and b%i==0:
  count+=1
  if count==k:
    print(i)

### FIXED CODE ###

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

ans = []
for i in range(1, min(A, B) + 1):
    if (A%i==0) and (B%i==0):
        ans.append(i)

print(ans[-K])
n,m = (int(i) for i in input().split())

A = [0]*2*100000

for i in range(m):
    xr,xl,d = [int(i) for i in input().split()]
    if xr in A and xl in A:
        if A.index(xr) + d != A.index(xl):
            print("No")
            break
    elif xr in A:
        A[A.index(xr)+d] = xl
    elif xl in A:
        A[A.index(xl)-d] = xr
    else:
        A[xr+n-1] = xr
        A[xr+n-1+d] = xl
else:
    print("Yes")

### FIXED CODE ###

import sys
sys.setrecursionlimit(200002)

def dfs(s):
	global x, G
	for t, d in G[s]:
		if x[t] is None:
			x[t] = x[s] + d
			if not dfs(t):
				return False
		else:
			if x[t] != x[s] + d:
				return False
	return True

N,M = map(int,input().split())
x = [None] * N
G = [[] for _ in range(N)]
for _ in range(M):
	L, R, D = map(int,input().split())
	G[L-1].append([R-1,D])
	G[R-1].append([L-1,-D])

res = True
for i in range(N):
	if x[i] is None:
		x[i] = 0
		res &= dfs(i)

print("Yes" if res == True else "No")
N, M = map(int, input().split())
G = [[] for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
def is_bipartite(G):
    n = len(G)
    color = [-1]*n
    que = deque([0])
    color[0] = 0
    while que:
        v = que.pop()
        c = color[v]
        for nv in G[v]:
            if color[nv]<0:
                color[nv] = 1-c
                que.append(nv)
            elif color[nv] == c:
                return False
    return color
color = is_bipartite(G)
if color:
    a = color.count(0)
    b = N-a
    print(a*b-M)
else:
    print(N*(N-1)//2-M)
            
            

### FIXED CODE ###

from collections import deque
N, M = map(int, input().split())
G = [[] for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
def is_bipartite(G):
    n = len(G)
    color = [-1]*n
    que = deque([0])
    color[0] = 0
    while que:
        v = que.pop()
        c = color[v]
        for nv in G[v]:
            if color[nv]<0:
                color[nv] = 1-c
                que.append(nv)
            elif color[nv] == c:
                return False
    return color
color = is_bipartite(G)
if color:
    a = color.count(0)
    b = N-a
    print(a*b-M)
else:
    print(N*(N-1)//2-M)
def is_palindrome(str):
  i, j = 0, len(str)-1
  while i != j:
    if str[i] != str[j]:
      return False
    i += 1
    j -= 1

  return True

s = input()
n = len(s)
if is_palindrome(s) and is_palindrome(s[0:((n-1)//2)]) and is_palindrome(s[(n+1)//2:]):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

def is_palindrome(str):
  i, j = 0, len(str)-1
  while i <= j:
    if str[i] != str[j]:
      return False
    i += 1
    j -= 1

  return True

s = input()
n = len(s)
if is_palindrome(s) and is_palindrome(s[0:((n-1)//2)]) and is_palindrome(s[(n+3)//2-1:]):
  print("Yes")
else:
  print("No")
from itertools import accumulate


def main():
    cells, moves = [int(x) for x in input().split()]
    nexts = [int(x) - 1 for x in input().split()]
    scores = [int(x) for x in input().split()]

    ans = -10 ** 9 - 5
    # whole_break = False
    for start in range(cells):
        route = []
        seen = set()
        route_append = route.append
        seen_add = seen.add
        now = start
        for _step in range(cells):
            nex = nexts[now]
            # if nex < start:
            #     whole_break = True
            #     break
            if nex in seen:
                break
            route_append(scores[nex])
            seen_add(nex)
            now = nex

        length = len(route)
        total = sum(route)
        # if whole_break:
        #     whole_break = False
        #     if moves > length:
        #         break

        if total > 0 and moves > length:
            q, mod = divmod(moves, length)
            candidate = max(list(accumulate(route))[:mod]) + total * q
        else:
            candidate = max(list(accumulate(route))[:min(moves, length)])
        ans = max(ans, candidate)

    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

from itertools import accumulate


def main():
    cells, moves = [int(x) for x in input().split()]
    jumps_from = [int(x) - 1 for x in input().split()]
    score_on = [int(x) for x in input().split()]

    ans = - 10**10
    for start in range(cells):
        route = []
        route_append = route.append
        position = start
        while True:
            route_append(score_on[position])
            position = jumps_from[position]
            if position == start:  # Looped
                break

        length = len(route)
        total = sum(route)
        accum_tmp = 0
        for i, score in enumerate(route):
            accum_tmp += score
            if i + 1 > moves:
                break
            accum = accum_tmp
            if total > 0:
                accum += total * ((moves - (i + 1)) // length)
            ans = max(ans, accum)

        # if total > 0:
        #     q, mod = divmod(moves, length)
        #     if mod == 0:
        #         candidate = total * q
        #     else:
        #         candidate = max(list(accumulate(route))[:mod]) + total * q
        # else:
        #     candidate = max(list(accumulate(route))[:min(moves, length)])
        # ans = max(ans, candidate)
    return ans


if __name__ == '__main__':
    ans = main()
    print(ans)
s = input()
ans = []
for c in s:
    if c == '0':
        ans.append('0')
    elif c == '1':
        ans.append('1')
    else:
        ans.pop(-1)
print(''.join(ans))



### FIXED CODE ###

s = input()
ans = []
for c in s:
    if c == '0':
        ans.append('0')
    elif c == '1':
        ans.append('1')
    elif len(ans):
        ans.pop(-1)
print(''.join(ans))
import numpy as np

n, k = map(int, input().split())
lst = list(map(int, input().split()))

if len(lst) == 1 and lst[0] == 0:
    print(0)
    exit()

array = np.array(lst)
po_array = array[array>=0]
ne_array = abs(array[array<0])
ne_array.sort()

if len(po_array) >= len(ne_array):
    long_array = po_array
    short_array = ne_array
else:
    long_array = ne_array
    short_array = po_array

if len(short_array) > k:
    min_len = k
else:
    min_len = len(short_array)
        
if min_len == 0:
    print(long_array[k-1])
else:
    min_dist = 10**10
    for i in range(min_len):
        if i == k-1:
            dist = short_array[i]
        else:
            dist = min(short_array[i]*2 + long_array[k-i-2], short_array[i] + long_array[k-i-2]*2)
        if min_dist > dist:
            min_dist = dist
    if len(long_array) >= k:
        if min_dist > long_array[k-1]:
            min_dist = long_array[k-1]
    print(min_dist)

### FIXED CODE ###

import numpy as np

n, k = map(int, input().split())
lst = list(map(int, input().split()))

array = np.array(lst)
po_array = array[array>=0]
ne_array = abs(array[array<0])
ne_array.sort()

if len(po_array) >= len(ne_array):
    long_array = po_array
    short_array = ne_array
else:
    long_array = ne_array
    short_array = po_array

if len(short_array) > k:
    min_len = k
else:
    min_len = len(short_array)
        
if min_len == 0:
    print(long_array[k-1])
else:
    min_dist = 10**10
    for i in range(min_len):
        dist = 10**10
        if i == k-1:
            dist = short_array[i]
        elif k-i-1 <= len(long_array): 
            dist = min(short_array[i]*2 + long_array[k-i-2], short_array[i] + long_array[k-i-2]*2)
        if min_dist > dist:
            min_dist = dist
    if len(long_array) >= k:
        if min_dist > long_array[k-1]:
            min_dist = long_array[k-1]
    print(min_dist)
import math 
from decimal import Decimal a,b,c=map(int,input().split()) 
A=Decimal(a) 
B=Decimal(b)
C=Decimal(c) 
if math.sqrt(A)+math.sqrt(B)<math.sqrt(C): 
    print("Yes") 
else: 
    print("No") 

### FIXED CODE ###

import math 
from decimal import Decimal 
a,b,c=map(int,input().split()) 
A=Decimal(a)**Decimal(0.5) 
B=Decimal(b)**Decimal(0.5)
C=Decimal(c)**Decimal(0.5)
if A+B<C: 
    print("Yes") 
else: 
    print("No")
a,b = map(int, input())
print(a/b)

### FIXED CODE ###

T,X = map(int,input().split())
print(T/X)
k = int(input())
x = 7%k
s = []

for i in range(k):
  if x == 0:
    print(len(i+1))
    exit()
  s.append(x)
  x = (10*x + 7)%k

  
  
print(-1)


### FIXED CODE ###

k = int(input())
x = 7%k
s = []

for i in range(k):
  if x == 0:
    print(i+1)
    exit()
  s.append(x)
  x = (10*x + 7)%k

  
  
print(-1)
raise Exception((eval("'a'")))

### FIXED CODE ###

import re

p = 0
class N(int):
    def __add__(self,n):
        return N((int(self) + int(n)) % p)
    def __sub__(self,n):
        return N((int(self) - int(n)) % p)
    def __mul__(self,n):
        return N((int(self) * int(n)) % p)
    def __floordiv__(self,n):
        if not n:
            raise ZeroDivisionError
        return self*pow(int(n),p-2,p)

while True:
    s = input()
    p,s = s.split(':')
    p = int(p)
    if not p:
        break
    s = s.replace(' ','')
    try:
        n = eval(re.sub(r'(\d+)',r'N(\1)',s).replace('/','//'))
        print('%s = %s (mod %s)'%(s,n,p))
    except ZeroDivisionError:
        print('NG')
s = input()
a = set(a)
if len(a) == 3:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s = input()
a = set(s)
if len(a) == 3:
  print("Yes")
else:
  print("No")
a, b, k = map(int, input().split())

import math
gcd = math.gcd(a, b)
cnt = 0
for i in range(1, gcd+1):
    if gcd % i == 0:
        cnt += 1
    if cnt == k:
        print(i)
        break



### FIXED CODE ###

a, b, k = map(int, input().split())
cnt = 0
for i in reversed(range(1, 101)):
    if a%i==0 and b%i==0:
        cnt += 1
        if cnt == k:
            print(i)
            break
r,g,b=map(int,raw_input().split(' '))
     
    if (r*100+g*10+b)%4==0:
      print "YES"
    else:
      print "NO"

### FIXED CODE ###

r,g,b=map(int,raw_input().split(' '))
                 
if (r*100+g*10+b)%4==0:
    print "YES"
else:
    print "NO"
n, k = map(int, input().split())
pList = map(int, input().split())
#n, k = 5, 3
#pList = [50, 100, 80, 120, 80]
list.sort(pList)
score = 0
for i in range(k):
    score += pList[i]
print(score)

### FIXED CODE ###

n, k = map(int, input().split())
#pList = map(int, input().split())
split = input().split()
pList = [int(i) for i in split]
list.sort(pList)
score = 0
for i in range(k):
    score += pList[i]
print(score)
n = int(input())
h = [int(i) for in in input().split()]
if h[j+1] - h[j] < -1 for j in range(n):
  print("No")
elif h[k+2] < h[k+1] and h[k+1] <= h[k] for k in range(n-1):
  print("No")
else:
  print("Yes")


### FIXED CODE ###

n = int(input())
h = [int(i) for i in input().split()]
for j in range(n-1):
  if h[j] - h[j+1] > 1:
    print("No")
    exit()
  elif h[j] == h[j+1] + 1:
    h[j+1] += 1
print("Yes")
(r, c) = [int(i) for i in input().split()]
src = []
for _ in range(r):
    row = ([int(i) for i in input().split()])
    row.append(sum(row))
    src.append(row)

last_row = [0 for _ in range(c+1)]
for rc in range(r):
    for cc in range(c):
        last_row += src[rc][cc]
src.append(last_row)

for rc in range(r+1):
    print(' '.join([str(a) for a in src[rc]]))

### FIXED CODE ###

(r, c) = [int(i) for i in input().split()]
src = []
for _ in range(r):
    row = [int(i) for i in input().split()]
    row.append(sum(row))
    src.append(row)
last_row = [0 for _ in range(c + 1)]
for rc in range(r):
    for cc in range(c+1):
        last_row[cc] += src[rc][cc]
src.append(last_row)
 
for rc in range(r+1):
    print(' '.join([str(a) for a in src[rc]]))
lst=[]
for n in range(10):
    lst.append(int(input())
res=sorted(lst, reverse=True)
for i in range(3):
    print(res[i])

### FIXED CODE ###

lst=[]
for n in range(10):
    lst.append(int(input()))
res=sorted(lst, reverse=True)
for i in range(3):
    print(res[i])
len(max(re.sub(r'[^ACGT]', ' ', input()).split()))

### FIXED CODE ###

row = input()
lenght = len(row)
max_moji = 0
for i in range(lenght):
    if row[i] in 'ACGT':
        moji = 1
        for j in range(i + 1, lenght):
            if row[j] in 'ACGT':
                moji += 1
            else:
                break
        max_moji = moji if moji > max_moji else max_moji
    if max_moji == lenght - i:
        break
print(max_moji)
def moores_d(n, s, graph, init_val): 
    d = [init_val] * n
    d[s] = 0
    stack = [s]
    for _ in range(n):
        next_stack = []
        for _ in range(m):
            vf = stack.pop()
            for vt, w in graph[vf]:
                if d[vt] > d[vf] + w:
                    d[vt] = d[vf] + w
                    next_stack.append(vt)
        stack = next_stack
        if not stack:
            break
    if stack: #閉路の存在
        minus_inf = -float('inf')
        next_stack = []
        while stack:
            vf = stack.pop()
            for vt, w in graph[vf]:
                if d[vt] > d[vf] + w:
                    d[vt] = minus_inf
                    next_stack.append(vt)
            stack = next_stack
    return d

n, m = map(int, input().split())
graph = [[] for _ in range(n)]
for i in range(m):
    a, b, w = map(int, input().split())
    graph[a-1].append((b-1, -w))
d = moores_d(n, 0, graph, float('inf'))
print(-d[-1] if d[-1] != -float('inf') else 'inf')


### FIXED CODE ###

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

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

init_val = -10 ** 9 * 1000
d = [init_val] * n
d[0] = 0
for _ in range(n):
    updated = False
    for a, b, w in edges:
        if d[a] != init_val and d[b] < d[a] + w:
            d[b] = d[a] + w
            updated = True
    if not updated:
        break
if updated: #閉路の存在
     for a, b, w in edges:
        if d[a] != init_val and d[b] < d[a] + w:
            d[b] = d[a] + w
            if b == n - 1:
                print('inf')
                quit()
print(d[n-1])
s=input()
t=input()
s=0
for i in range(len(s)):
  if s[i]==t[i]:
    s+=1
print(s)

### FIXED CODE ###

s=input()
t=input()
a=0
for i in range(len(s)):
  if s[i]==t[i]:
    a+=1
print(a)
n = int(input())
print(n if n%2==0 else n*2)

### FIXED CODE ###

n,k = map(int,input().split())
print(0 if n%k==0 else 1)
def main():
    N,K = list(map(int,input().split()))
    H = list(map(int,input().split()))

    sorted_H = sorted(H,reverse=True)

    for i in range(K):
        sorted_H[i] = 0
    '''
    for _ in range(K):
        if(len(H) > 0):
            maximum = max(H)
            H.remove(maximum)
            '''

    print(sum(sorted_H))

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    N,K = list(map(int,input().split()))
    H = list(map(int,input().split()))

    sorted_H = sorted(H,reverse=True)

    for i in range(K):
        if(i < len(sorted_H)):
            sorted_H[i] = 0

    '''
    for _ in range(K):
        if(len(H) > 0):
            maximum = max(H)
            H.remove(maximum)
            '''

    print(sum(sorted_H))

if __name__ == "__main__":
    main()
N, K = map(int, input().split())
A = [int(i) for i in input().split()]

OK = 10**12
NG = -1

while OK-NG > 1:
    mid = (OK+NG)//2
    cnt = 0
    for a in A:
        cnt += (a-1)//mid
    if cnt <= K:
        OK = mid
    else:
        NG = mid
    # print('OK:{}, NG:{}, cnt:{}'.format(OK, NG, cnt))

print(OK)


### FIXED CODE ###

N, K = map(int, input().split())
A = [int(i) for i in input().split()]

OK = 10**12
NG = 0

while OK-NG > 1:
    mid = (OK+NG)//2
    cnt = 0
    for a in A:
        cnt += (a-1)//mid
    if cnt <= K:
        OK = mid
    else:
        NG = mid
    # print('OK:{}, NG:{}, cnt:{}'.format(OK, NG, cnt))

print(OK)
if S == "ABC" : 
  print("ARC")
if S == "ARC" :
  print("ABC")

### FIXED CODE ###

S = input()
if S == "ABC" : 
  print("ARC")
else :
  print("ABC")
if ( a + b )%2 == 0:
	print((a+b)//2)
else:
	print('IMPOSSIBLE')

### FIXED CODE ###

a,b = map(int, input().split())
if ( a + b )%2 == 0:
	print((a+b)//2)
else:
	print('IMPOSSIBLE')
R=input()
G=input()
N=2*G-R
print(N)

### FIXED CODE ###

a = []
for i in range(2):
    a.append(input()) 
R=int(a[0])
G=int(a[1])
print(2*G-R)
N, M = map(int, input().split())
INF = 10**9

edges = []

for i in range(M):
    edges.append(list(map(int, input().split())))

dist = [[INF for j in range(N)] for i in range(N)]

for i in range(N):
    dist[i][i] = 0

for i in range(M):
    a, b, c = edges[i]
    a, b = a - 1, b - 1
    dist[a][b] = c[i]
    dist[b][a] = c[i]
    
for k in range(N):
    for i in range(N):
        for j in range(N):
            dist[i][j] = min(dist[i][k] + dist[k][j], dist[i][j])

res = M
for i in range(M):
    a, b, c = edges[i]
    a, b = a - 1, b - 1
    shortest = False
    for j in range(N):
        if dist[j][a] + c == dist[j][b]:
            shortest = True
            break
    res -= 1

print(res)


### FIXED CODE ###

N, M = map(int, input().split())
INF = 10**9

edges = []

for i in range(M):
    edges.append(list(map(int, input().split())))

dist = [[INF for j in range(N)] for i in range(N)]

for i in range(N):
    dist[i][i] = 0

for i in range(M):
    a, b, c = edges[i]
    a, b = a - 1, b - 1
    dist[a][b] = c
    dist[b][a] = c
    
for k in range(N):
    for i in range(N):
        for j in range(N):
            dist[i][j] = min(dist[i][k] + dist[k][j], dist[i][j])

res = M
for i in range(M):
    a, b, c = edges[i]
    a, b = a - 1, b - 1
    shortest = False
    for j in range(N):
        if dist[j][a] + c == dist[j][b]:
            shortest = True
            break
    if shortest:
        res -= 1

print(res)
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 8)

from itertools import accumulate


def factorial(x):
    if x <= 0:
        return 1

    return factorial(x - 1) * x


def comb(n, r):
    return factorial(n) / factorial(r) / factorial(n - r)


def main():
    n = int(input())
    l = list(map(int, input().split()))

    nums = [0] * 1001

    for e in l:
        nums[e] += 1

    acm = list(accumulate(nums))

    l.sort()
    ans = 0
    tmp = [0] * 1001
    tmp2 = [[0] * 1001 for _ in range(1001)]
    for i in range(n-2):
        for j in range(i+1, n-1):
            a = l[i]
            b = l[j]
            k = min(1000, a+b-1)

            # b < c のときの数
            cnt = acm[k] - acm[b]

            # b == c のときの補正
            if nums[b] >= 3 and a == b and tmp[b] == 0:
                cnt += int(comb(nums[b], 3))
                tmp[b] = 1

            if nums[b] >= 2 and a != b and tmp2[a][b] == 0:
                cnt += int(comb(nums[b], 2)) * nums[a]
                tmp2[a][b] = 1

            ans += cnt

    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline

from bisect import bisect_left


def main():
    n = int(input())
    l = list(map(int, input().split()))

    l.sort()

    ans = 0
    for i in range(n - 2):
        for j in range(i + 1, n - 1):
            a = l[i]
            b = l[j]
            mx = bisect_left(l, a + b)
            ans += mx - j - 1

    print(ans)


if __name__ == "__main__":
    main()
N, M, P = map(int, input().split())
X = [list(map(int, input().split())) for _ in range(M)]

edges = [[] for _ in range(N)]
to = [[] for _ in range(N)]
ot = [[] for _ in range(N)]

for a, b, c in X:
    a -= 1
    b -= 1
    c = -(c - P)
    edges[a].append((b, c))
    to[a].append(b)
    ot[b].append(a)

ok_1 = [False] * N
ok_n = [False] * N

# Reachable
def dfs(u):
    if ok_1[u]:
        return
    
    ok_1[u] = True
    for v in to[u]:
        dfs(v)
        
def rdfs(u):
    if ok_n[u]:
        return
    
    ok_n[u] = True
    for v in ot[u]:
        rdfs(v)
        
dfs(0)
rdfs(N - 1)
flag = [ok_1[i] & ok_n[i] for i in range(N)]

# Bellman ford
INF = 10 ** 9 + 7
d = [INF] * N
d[0] = 0
cnt = 0
updated = True
while updated and cnt < N:
    updated = False
    cnt += 1
    for u in range(N):
        if not flag[u]:
            continue
        for v, c in edges[u]:
            if not flag[v]:
                continue

            value = d[u] + c
            if d[v] > d[u] + c:
                d[v] = value
                updated = True

if cnt == N:
    print(-1)
else:
    print(max(0, -d[-1]))


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 9)

N, M, P = map(int, input().split())
X = [list(map(int, input().split())) for _ in range(M)]

edges = [[] for _ in range(N)]
to = [[] for _ in range(N)]
ot = [[] for _ in range(N)]

for a, b, c in X:
    a -= 1
    b -= 1
    c = -(c - P)
    edges[a].append((b, c))
    to[a].append(b)
    ot[b].append(a)

ok_1 = [False] * N
ok_n = [False] * N

# Reachable
def dfs(u):
    if ok_1[u]:
        return
    
    ok_1[u] = True
    for v in to[u]:
        dfs(v)
        
def rdfs(u):
    if ok_n[u]:
        return
    
    ok_n[u] = True
    for v in ot[u]:
        rdfs(v)
        
dfs(0)
rdfs(N - 1)
flag = [ok_1[i] & ok_n[i] for i in range(N)]

# Bellman ford
INF = 10 ** 9 + 7
d = [INF] * N
d[0] = 0
cnt = 0
updated = True
while updated and cnt <= N:
    updated = False
    cnt += 1
    for u in range(N):
        if not flag[u]:
            continue
        for v, c in edges[u]:
            if not flag[v]:
                continue

            value = d[u] + c
            if d[v] > d[u] + c:
                d[v] = value
                updated = True

if cnt > N:
    print(-1)
else:
    print(max(0, -d[-1]))
import sys
input = sys.stdin.readline

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

def ans(N, W):
    d = [float("inf")] * N * 1000
    d[0] = 0
    V = 0

    for i in range(N):
        wi, vi = [int(i) for i in input().split()]
        V = V + vi

        for v in range(V, vi-1, -1):
            w_ = d[v - vi] + wi
            if w_ < d[v]:
                d[v] = w_

    for v in range(V, -1, -1):
        if d[v] <= W:
            return v

print(ans(N, W))


### FIXED CODE ###

import sys
input = sys.stdin.readline

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

def ans(N, W):
    d = [float("inf")] * (N * 1000 + 1)
    d[0] = 0
    V = 0

    for i in range(N):
        wi, vi = [int(i) for i in input().split()]
        V = V + vi

        for v in range(V, vi-1, -1):
            w_ = d[v - vi] + wi
            if w_ < d[v]:
                d[v] = w_

    for v in range(V, -1, -1):
        if d[v] <= W:
            return v

print(ans(N, W))
n = int(input())
a = [int(input()) for _ in range(n)]

pushed = set()
cnt = 0
push= 1
while True:
    if push in pushed:
        cnt = -1
        break
    pushed.add(push)
    push = a[push]
    cnt += 1
    if push == 2:
        break

print(cnt)
    


### FIXED CODE ###

n = int(input())
a = [int(input()) for _ in range(n)]

pushed = set()
cnt = 0
push= 1
while True:
    if push in pushed:
        cnt = -1
        break
    pushed.add(push)
    push = a[push-1]
    cnt += 1
    if push == 2:
        break

print(cnt)
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]
 
import itertools
hoges = {}
for i in itertools.combinations(xy, 2):
    if i[0][0] - i[1][0] >= 0:
        hoge = (i[0][0] - i[1][0], i[0][1] - i[1][1])
    else:
        hoge = (i[1][0] - i[0][0], i[1][1] - i[0][1])
    hoges.setdefault(hoge, 0)
    hoges[hoge] += 1
# print(hoges)
max_v = max(hoges.values())
print(N - max_v)

### FIXED CODE ###

from itertools import combinations
from collections import Counter

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

cXY = combinations(XY, 2)

edge = []
for a, b in cXY:
  edge.append((a[0]-b[0], a[1]-b[1]))
  edge.append((-a[0]+b[0], -a[1]+b[1]))

ce = Counter(edge)

if N == 1:
  ans = 1
else:
  dup = max(ce.values())
  ans = N - dup
print(ans)