import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
import heapq
from fractions  import gcd
#input=sys.stdin.readline
#import bisect
n=int(input())
l=[i for i in range(n)]
xy=[list(map(int,input().split()))  for _ in range(n)]
if n==1:
  print(1)
  exit()
comb=itertools.permutations(l,2)
dic={}
for c in comb:
    i,j=c
    xi,yi=xy[i]
    xj,yj=xy[j]
    p=xi-xj
    q=yi-yj
    if (p,q) not in dic:
        dic[(p,q)]=1
    else:
        dic[(p,q)]+=1
res=-1
ai=-1
for i in dic.keys():
    if res<dic[i]:
        ai=i
        res=dic[i]
print(n-dic[ai]) import sys sys import math math import itertools itertools from collections import deque from collections import Counter import heapq heapq from fractions  import gcd n=int(input()) n int(input()) int input() input i for i in range(n) for i in range(n) i range(n) range n for i in range(n) i l=[i for i in range(n)] l [i for i in range(n)] 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 comb=itertools.permutations(l,2) comb itertools.permutations(l,2) itertools.permutations itertools permutations l 2 dic={} dic {} for c in comb:
    i,j=c
    xi,yi=xy[i]
    xj,yj=xy[j]
    p=xi-xj
    q=yi-yj
    if (p,q) not in dic:
        dic[(p,q)]=1
    else:
        dic[(p,q)]+=1 c comb i,j=c i c j xi,yi=xy[i] xi xy[i] xy i yi xj,yj=xy[j] xj xy[j] xy j yj p=xi-xj p xi-xj xi xj q=yi-yj q yi-yj yi yj if (p,q) not in dic:
        dic[(p,q)]=1
    else:
        dic[(p,q)]+=1 (p,q) not in dic (p,q) p q dic dic[(p,q)]=1 dic[(p,q)] dic (p,q) p q 1 dic[(p,q)]+=1 dic[(p,q)] dic (p,q) p q 1 res=-1 res -1 ai=-1 ai -1 for i in dic.keys():
    if res<dic[i]:
        ai=i
        res=dic[i] i dic.keys() dic.keys dic keys if res<dic[i]:
        ai=i
        res=dic[i] res<dic[i] res dic[i] dic i ai=i ai i res=dic[i] res dic[i] dic i print(n-dic[ai]) print n-dic[ai] n dic[ai] dic ai q=yi-yj yi-yj q dic={} {} dic ai=i i ai l=[i for i in range(n)] [i for i in range(n)] l i,j=c c i comb=itertools.permutations(l,2) itertools.permutations(l,2) comb xy=[list(map(int,input().split()))  for _ in range(n)] [list(map(int,input().split()))  for _ in range(n)] xy xj,yj=xy[j] xy[j] xj j=c c j yi=xy[i] xy[i] yi res=-1 -1 res n=int(input()) int(input()) n xi,yi=xy[i] xy[i] xi p=xi-xj xi-xj p yj=xy[j] xy[j] yj ai=-1 -1 ai res=dic[i] dic[i] res
import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
import heapq
from fractions  import gcd
#input=sys.stdin.readline
#import bisect
n=int(input())
l=[i for i in range(n)]
xy=[list(map(int,input().split()))  for _ in range(n)]
if n==1:
  print(1)
  exit()
comb=itertools.permutations(l,2)
dic={}
for c in comb:
    i,j=c
    xi,yi=xy[i]
    xj,yj=xy[j]
    p=xi-xj
    q=yi-yj
    if (p,q) not in dic:
        dic[(p,q)]=1
    else:
        dic[(p,q)]+=1
res=-1
ai=-1
for i in dic.keys():
    if res<dic[i]:
        ai=i
        res=dic[i]
print(n-dic[ai])