from collections import Counter
n= int(input())
if n==1:
  print(1)
  exit()
xy=[[int(x) for x in input().split()] for _ in range(n)]
gr = [[[0,0]for _ in range(n)]for _ in range(n)]
for i in range(n):
  a,b = xy[i]
  for j in range(n):
    gr[i][j] = [xy[j][0]-a,xy[j][1]-b]
gr1 = []
for i in gr:
  for j in i:
    gr1.append(tuple(j))
#print(gr1)
c = Counter(gr1)
l,f = c.most_common()[0]
if l!=(0,0):
  print(n-f)
else:
  l,f = c.most_common()[1]
  print(n-f) from collections import Counter n= int(input()) n int(input()) int input() input if n==1:
  print(1)
  exit() n==1 n 1 print(1) print 1 exit() exit [int(x) for x in input().split()] for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) [int(x) for x in input().split()] xy=[[int(x) for x in input().split()] for _ in range(n)] xy [[int(x) for x in input().split()] for _ in range(n)] [[0,0]for _ in range(n)]for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) [[0,0]for _ in range(n)] gr = [[[0,0]for _ in range(n)]for _ in range(n)] gr [[[0,0]for _ in range(n)]for _ in range(n)] for i in range(n):
  a,b = xy[i]
  for j in range(n):
    gr[i][j] = [xy[j][0]-a,xy[j][1]-b] i range(n) range n a,b = xy[i] a xy[i] xy i b for j in range(n):
    gr[i][j] = [xy[j][0]-a,xy[j][1]-b] j range(n) range n gr[i][j] = [xy[j][0]-a,xy[j][1]-b] gr[i][j] [i] gr i j [xy[j][0]-a,xy[j][1]-b] xy[j][0]-a xy[j][0] [j] xy j 0 a xy[j][1]-b xy[j][1] [j] xy j 1 b gr1 = [] gr1 [] for i in gr:
  for j in i:
    gr1.append(tuple(j))
#print(gr1) i gr for j in i:
    gr1.append(tuple(j))
#print(gr1) j i gr1.append(tuple(j)) gr1.append gr1 append tuple(j) tuple j c = Counter(gr1) c Counter(gr1) Counter gr1 l,f = c.most_common()[0] l c.most_common()[0] c.most_common() c.most_common c most_common 0 f if l!=(0,0):
  print(n-f)
else:
  l,f = c.most_common()[1]
  print(n-f) l!=(0,0) l (0,0) 0 0 print(n-f) print n-f n f l,f = c.most_common()[1] l c.most_common()[1] c.most_common() c.most_common c most_common 1 f print(n-f) print n-f n f gr1 = [] [] gr1 a,b = xy[i] xy[i] a f = c.most_common()[0] c.most_common()[0] f b = xy[i] xy[i] b xy=[[int(x) for x in input().split()] for _ in range(n)] [[int(x) for x in input().split()] for _ in range(n)] xy gr = [[[0,0]for _ in range(n)]for _ in range(n)] [[[0,0]for _ in range(n)]for _ in range(n)] gr c = Counter(gr1) Counter(gr1) c l,f = c.most_common()[0] c.most_common()[0] l l,f = c.most_common()[1] c.most_common()[1] l n= int(input()) int(input()) n f = c.most_common()[1] c.most_common()[1] f
from collections import Counter
n= int(input())
if n==1:
  print(1)
  exit()
xy=[[int(x) for x in input().split()] for _ in range(n)]
gr = [[[0,0]for _ in range(n)]for _ in range(n)]
for i in range(n):
  a,b = xy[i]
  for j in range(n):
    gr[i][j] = [xy[j][0]-a,xy[j][1]-b]
gr1 = []
for i in gr:
  for j in i:
    gr1.append(tuple(j))
#print(gr1)
c = Counter(gr1)
l,f = c.most_common()[0]
if l!=(0,0):
  print(n-f)
else:
  l,f = c.most_common()[1]
  print(n-f)