from collections import defaultdict
dic = defaultdict(int) #初期化する関数。

N = int(input())
if N == 1:
  print(1)
  exit()
X = []
for i in range(N):
  x,y = map(int,input().split())
  X.append([x,y])

for i in range(N):
  for j in range(i+1,N):
    p = X[i][0] - X[j][0]
    q = X[i][1] - X[j][1]
    if p <0:
      p = -p;q=-q
    if p == 0 and q < 0:
      q=-q
    dic[(p,q)] +=1

path = max(dic.values())
ans = N-path
#print(dic)
print(ans) from collections import defaultdict dic = defaultdict(int) dic defaultdict(int) defaultdict int 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 X = [] X [] for i in range(N):
  x,y = map(int,input().split())
  X.append([x,y]) i range(N) range N x,y = map(int,input().split()) x map(int,input().split()) map int input().split() ().split () input split y X.append([x,y]) X.append X append [x,y] x y for i in range(N):
  for j in range(i+1,N):
    p = X[i][0] - X[j][0]
    q = X[i][1] - X[j][1]
    if p <0:
      p = -p;q=-q
    if p == 0 and q < 0:
      q=-q
    dic[(p,q)] +=1 i range(N) range N for j in range(i+1,N):
    p = X[i][0] - X[j][0]
    q = X[i][1] - X[j][1]
    if p <0:
      p = -p;q=-q
    if p == 0 and q < 0:
      q=-q
    dic[(p,q)] +=1 j range(i+1,N) range i+1 i 1 N p = X[i][0] - X[j][0] p X[i][0] - X[j][0] X[i][0] [i] X i 0 X[j][0] [j] X j 0 q = X[i][1] - X[j][1] q X[i][1] - X[j][1] X[i][1] [i] X i 1 X[j][1] [j] X j 1 if p <0:
      p = -p;q=-q
     p <0 p 0 p = -p p -p p q=-q q -q q if p == 0 and q < 0:
      q=-q
     p == 0 and q < 0 p == 0 p 0 q < 0 q 0 q=-q q -q q dic[(p,q)] +=1 dic[(p,q)] dic (p,q) p q 1 path = max(dic.values()) path max(dic.values()) max dic.values() dic.values dic values ans = N-path ans N-path N path print(ans) print ans q=-q -q q y = map(int,input().split()) map(int,input().split()) y x,y = map(int,input().split()) map(int,input().split()) x q = X[i][1] - X[j][1] X[i][1] - X[j][1] q X = [] [] X p = X[i][0] - X[j][0] X[i][0] - X[j][0] p dic = defaultdict(int) defaultdict(int) dic p = -p -p p path = max(dic.values()) max(dic.values()) path ans = N-path N-path ans N = int(input()) int(input()) N q=-q -q q
from collections import defaultdict
dic = defaultdict(int) #初期化する関数。

N = int(input())
if N == 1:
  print(1)
  exit()
X = []
for i in range(N):
  x,y = map(int,input().split())
  X.append([x,y])

for i in range(N):
  for j in range(i+1,N):
    p = X[i][0] - X[j][0]
    q = X[i][1] - X[j][1]
    if p <0:
      p = -p;q=-q
    if p == 0 and q < 0:
      q=-q
    dic[(p,q)] +=1

path = max(dic.values())
ans = N-path
#print(dic)
print(ans)