from sys import stdin

nii=lambda:list(map(int,stdin.readline().split()))

lnii=lambda:list(map(int,stdin.readline().split()))



n=int(eval(input()))

xy=[lnii() for i in range(n)]

xy.sort(key=lambda x:x[0])



ans=n



pq=[]

for i in range(n):

  for j in range(n):

    if i==j:

      continue

    t_p=xy[j][0]-xy[i][0]

    t_q=xy[j][1]-xy[i][1]

    pq.append([t_p,t_q])



for p,q in pq:

  cnt=0

  for x,y in xy:

    if [x+p,y+q] in xy:

        cnt+=1

  ans=min(ans,n-cnt)



print(ans)
from sys import stdin

nii=lambda:list(map(int,stdin.readline().split()))

lnii=lambda:list(map(int,stdin.readline().split()))



n=int(eval(input()))

xy=[lnii() for i in range(n)]

xy.sort(key=lambda x:x[0])



ans=n



pq=[]

for i in range(n-1):

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

    t_p=xy[j][0]-xy[i][0]

    t_q=xy[j][1]-xy[i][1]

    pq.append([t_p,t_q])



for p,q in pq:

  cnt=0

  for x,y in xy:

    if [x+p,y+q] in xy:

        cnt+=1

  ans=min(ans,n-cnt)



print(ans)
from sys import stdin

nii = lambda: list(map(int, stdin.readline().split()))
lnii = lambda: list(map(int, stdin.readline().split()))
n = int(eval(input()))
xy = [lnii() for i in range(n)]
xy.sort(key=lambda x: x[0])
ans = n
pq = []
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        t_p = xy[j][0] - xy[i][0]
        t_q = xy[j][1] - xy[i][1]
        pq.append([t_p, t_q])
for p, q in pq:
    cnt = 0
    for x, y in xy:
        if [x + p, y + q] in xy:
            cnt += 1
    ans = min(ans, n - cnt)
print(ans)

from sys import stdin

nii = lambda: list(map(int, stdin.readline().split()))
lnii = lambda: list(map(int, stdin.readline().split()))
n = int(eval(input()))
xy = [lnii() for i in range(n)]
xy.sort(key=lambda x: x[0])
ans = n
pq = []
for i in range(n - 1):
    for j in range(i + 1, n):
        t_p = xy[j][0] - xy[i][0]
        t_q = xy[j][1] - xy[i][1]
        pq.append([t_p, t_q])
for p, q in pq:
    cnt = 0
    for x, y in xy:
        if [x + p, y + q] in xy:
            cnt += 1
    ans = min(ans, n - cnt)
print(ans)

-for i in range(n): -    for j in range(n): -        if i == j: -            continue +for i in range(n - 1): +    for j in range(i + 1, n):