from collections import Counter
n=int(input())
if n==1:
  print(1)
  exit()
xy=[tuple(map(int,input().split())) for _ in range(n)]

# print(xy)
xy.sort()
# print(xy)
l=[]
for i in range(n-1):
  for j in range(i+1,n):
    l.append((xy[j][0]-xy[i][0],xy[j][1]-xy[i][1]))

#most_common(): (要素、出現回数)という形のタプルを出現回数順に並べたリストを返す
print(n-Counter(l).most_common()[0][1])
 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 tuple(map(int,input().split())) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) tuple(map(int,input().split())) tuple map(int,input().split()) map int input().split() ().split () input split xy=[tuple(map(int,input().split())) for _ in range(n)] xy [tuple(map(int,input().split())) for _ in range(n)] xy.sort() xy.sort xy sort l=[] l [] for i in range(n-1):
  for j in range(i+1,n):
    l.append((xy[j][0]-xy[i][0],xy[j][1]-xy[i][1]))

#most_common(): (要素、出現回数)という形のタプルを出現回数順に並べたリストを返す i range(n-1) range n-1 n 1 for j in range(i+1,n):
    l.append((xy[j][0]-xy[i][0],xy[j][1]-xy[i][1]))

#most_common(): (要素、出現回数)という形のタプルを出現回数順に並べたリストを返す j range(i+1,n) range i+1 i 1 n l.append((xy[j][0]-xy[i][0],xy[j][1]-xy[i][1])) l.append l append (xy[j][0]-xy[i][0],xy[j][1]-xy[i][1]) xy[j][0]-xy[i][0] xy[j][0] [j] xy j 0 xy[i][0] [i] xy i 0 xy[j][1]-xy[i][1] xy[j][1] [j] xy j 1 xy[i][1] [i] xy i 1 print(n-Counter(l).most_common()[0][1]) print n-Counter(l).most_common()[0][1] n Counter(l).most_common()[0][1] [0] (l).most_common() (l).most_common (l) Counter l most_common 0 1 xy=[tuple(map(int,input().split())) for _ in range(n)] [tuple(map(int,input().split())) for _ in range(n)] xy l=[] [] l n=int(input()) int(input()) n
from collections import Counter
n=int(input())
if n==1:
  print(1)
  exit()
xy=[tuple(map(int,input().split())) for _ in range(n)]

# print(xy)
xy.sort()
# print(xy)
l=[]
for i in range(n-1):
  for j in range(i+1,n):
    l.append((xy[j][0]-xy[i][0],xy[j][1]-xy[i][1]))

#most_common(): (要素、出現回数)という形のタプルを出現回数順に並べたリストを返す
print(n-Counter(l).most_common()[0][1])

