from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

n=int(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
  for i in range(n):
    for j in range(n):
      if i==j:
        continue
      x1,y1=xy[i]
      x2,y2=xy[j]
      if (x2-x1)==p and (y2-y1)==q:
        cnt+=1
  ans=min(ans,n-cnt)
print(ans) from sys import stdin nii=lambda:map(int,stdin.readline().split()) nii lambda:map(int,stdin.readline().split()) map(int,stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split lnii=lambda:list(map(int,stdin.readline().split())) lnii lambda:list(map(int,stdin.readline().split())) list(map(int,stdin.readline().split())) list map(int,stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split n=int(input()) n int(input()) int input() input lnii() for i in range(n) for i in range(n) i range(n) range n for i in range(n) lnii() lnii xy=[lnii() for i in range(n)] xy [lnii() for i in range(n)] xy.sort(key=lambda x:x[0]) xy.sort xy sort key=lambda x:x[0] key lambda x:x[0] x[0] x 0 x ans=n ans n pq=[] 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]) i range(n-1) range n-1 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]) j range(i+1,n) range i+1 i 1 n t_p=xy[j][0]-xy[i][0] t_p xy[j][0]-xy[i][0] xy[j][0] [j] xy j 0 xy[i][0] [i] xy i 0 t_q=xy[j][1]-xy[i][1] t_q xy[j][1]-xy[i][1] xy[j][1] [j] xy j 1 xy[i][1] [i] xy i 1 pq.append([t_p,t_q]) pq.append pq append [t_p,t_q] 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
  for i in range(n):
    for j in range(n):
      if i==j:
        continue
      x1,y1=xy[i]
      x2,y2=xy[j]
      if (x2-x1)==p and (y2-y1)==q:
        cnt+=1
  ans=min(ans,n-cnt) p q pq cnt=0 cnt 0 for i in range(n):
    for j in range(n):
      if i==j:
        continue
      x1,y1=xy[i]
      x2,y2=xy[j]
      if (x2-x1)==p and (y2-y1)==q:
        cnt+=1
   i range(n) range n for j in range(n):
      if i==j:
        continue
      x1,y1=xy[i]
      x2,y2=xy[j]
      if (x2-x1)==p and (y2-y1)==q:
        cnt+=1
   j range(n) range n if i==j:
        continue
       i==j i j continue x1,y1=xy[i] x1 xy[i] xy i y1 x2,y2=xy[j] x2 xy[j] xy j y2 if (x2-x1)==p and (y2-y1)==q:
        cnt+=1
   (x2-x1)==p and (y2-y1)==q (x2-x1)==p x2-x1 x2 x1 p (y2-y1)==q y2-y1 y2 y1 q cnt+=1 cnt 1 ans=min(ans,n-cnt) ans min(ans,n-cnt) min ans n-cnt n cnt print(ans) print ans n=int(input()) int(input()) n y1=xy[i] xy[i] y1 cnt+=1 1 cnt xy=[lnii() for i in range(n)] [lnii() for i in range(n)] xy x2,y2=xy[j] xy[j] x2 y2=xy[j] xy[j] y2 cnt=0 0 cnt pq=[] [] pq x1,y1=xy[i] xy[i] x1 lnii=lambda:list(map(int,stdin.readline().split())) lambda:list(map(int,stdin.readline().split())) lnii t_q=xy[j][1]-xy[i][1] xy[j][1]-xy[i][1] t_q nii=lambda:map(int,stdin.readline().split()) lambda:map(int,stdin.readline().split()) nii ans=n n ans ans=min(ans,n-cnt) min(ans,n-cnt) ans t_p=xy[j][0]-xy[i][0] xy[j][0]-xy[i][0] t_p
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

n=int(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
  for i in range(n):
    for j in range(n):
      if i==j:
        continue
      x1,y1=xy[i]
      x2,y2=xy[j]
      if (x2-x1)==p and (y2-y1)==q:
        cnt+=1
  ans=min(ans,n-cnt)
print(ans)