import collections
N=int(input())
xy=[tuple(map(int,input().split())) for i in range(N)]
table=collections.defaultdict(int)

for x,y in xy:
  for x2,y2 in xy:
    if x==x2 and y==y2:
      continue
    else:
      table[(x-x2,y-y2)]+=1
ans=0
for x in table:
  ans=max(ans,table[x])
print(N-ans) import collections collections N=int(input()) N int(input()) int input() input tuple(map(int,input().split())) for i in range(N) for i in range(N) i range(N) range N for i 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 i in range(N)] xy [tuple(map(int,input().split())) for i in range(N)] table=collections.defaultdict(int) table collections.defaultdict(int) collections.defaultdict collections defaultdict int for x,y in xy:
  for x2,y2 in xy:
    if x==x2 and y==y2:
      continue
    else:
      table[(x-x2,y-y2)]+=1 x y xy for x2,y2 in xy:
    if x==x2 and y==y2:
      continue
    else:
      table[(x-x2,y-y2)]+=1 x2 y2 xy if x==x2 and y==y2:
      continue
    else:
      table[(x-x2,y-y2)]+=1 x==x2 and y==y2 x==x2 x x2 y==y2 y y2 continue table[(x-x2,y-y2)]+=1 table[(x-x2,y-y2)] table (x-x2,y-y2) x-x2 x x2 y-y2 y y2 1 ans=0 ans 0 for x in table:
  ans=max(ans,table[x]) x table ans=max(ans,table[x]) ans max(ans,table[x]) max ans table[x] table x print(N-ans) print N-ans N ans ans=0 0 ans N=int(input()) int(input()) N ans=max(ans,table[x]) max(ans,table[x]) ans table=collections.defaultdict(int) collections.defaultdict(int) table xy=[tuple(map(int,input().split())) for i in range(N)] [tuple(map(int,input().split())) for i in range(N)] xy
import collections
N=int(input())
xy=[tuple(map(int,input().split())) for i in range(N)]
table=collections.defaultdict(int)

for x,y in xy:
  for x2,y2 in xy:
    if x==x2 and y==y2:
      continue
    else:
      table[(x-x2,y-y2)]+=1
ans=0
for x in table:
  ans=max(ans,table[x])
print(N-ans)