from collections import defaultdict
n=int(input())
xy=[list(map(int,input().split())) for _ in range(n)]
if n==1:
  print(1)
  exit()
d=defaultdict(lambda:0)
for i in range(n-1):
  for j in range(i+1,n):
    dx=xy[i][0]-xy[j][0]
    dy=xy[i][1]-xy[j][1]
    d[(dx,dy)]+=1
    d[(-dx,-dy)]+=1
print(n-max(d.values()))
#for k,v in d.items():
#  print(k,v) from collections import defaultdict n=int(input()) n int(input()) int input() input list(map(int,input().split())) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split xy=[list(map(int,input().split())) for _ in range(n)] xy [list(map(int,input().split())) for _ in range(n)] if n==1:
  print(1)
  exit() n==1 n 1 print(1) print 1 exit() exit d=defaultdict(lambda:0) d defaultdict(lambda:0) defaultdict lambda:0 0 for i in range(n-1):
  for j in range(i+1,n):
    dx=xy[i][0]-xy[j][0]
    dy=xy[i][1]-xy[j][1]
    d[(dx,dy)]+=1
    d[(-dx,-dy)]+=1 i range(n-1) range n-1 n 1 for j in range(i+1,n):
    dx=xy[i][0]-xy[j][0]
    dy=xy[i][1]-xy[j][1]
    d[(dx,dy)]+=1
    d[(-dx,-dy)]+=1 j range(i+1,n) range i+1 i 1 n dx=xy[i][0]-xy[j][0] dx xy[i][0]-xy[j][0] xy[i][0] [i] xy i 0 xy[j][0] [j] xy j 0 dy=xy[i][1]-xy[j][1] dy xy[i][1]-xy[j][1] xy[i][1] [i] xy i 1 xy[j][1] [j] xy j 1 d[(dx,dy)]+=1 d[(dx,dy)] d (dx,dy) dx dy 1 d[(-dx,-dy)]+=1 d[(-dx,-dy)] d (-dx,-dy) -dx dx -dy dy 1 print(n-max(d.values())) print n-max(d.values()) n max(d.values()) max d.values() d.values d values dx=xy[i][0]-xy[j][0] xy[i][0]-xy[j][0] dx xy=[list(map(int,input().split())) for _ in range(n)] [list(map(int,input().split())) for _ in range(n)] xy d=defaultdict(lambda:0) defaultdict(lambda:0) d dy=xy[i][1]-xy[j][1] xy[i][1]-xy[j][1] dy n=int(input()) int(input()) n
from collections import defaultdict
n=int(input())
xy=[list(map(int,input().split())) for _ in range(n)]
if n==1:
  print(1)
  exit()
d=defaultdict(lambda:0)
for i in range(n-1):
  for j in range(i+1,n):
    dx=xy[i][0]-xy[j][0]
    dy=xy[i][1]-xy[j][1]
    d[(dx,dy)]+=1
    d[(-dx,-dy)]+=1
print(n-max(d.values()))
#for k,v in d.items():
#  print(k,v)
