ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq
n = ni()
if n==1:
    print(1)
    exit()
xy = []
for i in range(n):
    xy.append(tma())
co = collections.Counter()

for i in range(n):
    for j in range(n):
        if i==j:
            continue
        x1,y1 = xy[i]
        x2,y2 = xy[j]
        co[(x2-x1,y2-y1)] +=1

ans = 10**9
for num in co.values():
    ans = min(ans,n-num)
print(ans) ma = lambda :map(int,input().split()) ma lambda :map(int,input().split()) map(int,input().split()) map int input().split() ().split () input split lma = lambda :list(map(int,input().split())) lma lambda :list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split tma = lambda :tuple(map(int,input().split())) tma lambda :tuple(map(int,input().split())) tuple(map(int,input().split())) tuple map(int,input().split()) map int input().split() ().split () input split ni = lambda:int(input()) ni lambda:int(input()) int(input()) int input() input yn = lambda fl:print("Yes") if fl else print("No") yn lambda fl:print("Yes") if fl else print("No") print("Yes") if fl else print("No") fl print("Yes") print "Yes" print("No") print "No" fl import collections collections import math math import itertools itertools import heapq as hq heapq n = ni() n ni() ni if n==1:
    print(1)
    exit() n==1 n 1 print(1) print 1 exit() exit xy = [] xy [] for i in range(n):
    xy.append(tma()) i range(n) range n xy.append(tma()) xy.append xy append tma() tma co = collections.Counter() co collections.Counter() collections.Counter collections Counter for i in range(n):
    for j in range(n):
        if i==j:
            continue
        x1,y1 = xy[i]
        x2,y2 = xy[j]
        co[(x2-x1,y2-y1)] +=1 i range(n) range n for j in range(n):
        if i==j:
            continue
        x1,y1 = xy[i]
        x2,y2 = xy[j]
        co[(x2-x1,y2-y1)] +=1 j range(n) range n if i==j:
            continue
         i==j i j continue x1,y1 = xy[i] x1 xy[i] xy i y1 x2,y2 = xy[j] x2 xy[j] xy j y2 co[(x2-x1,y2-y1)] +=1 co[(x2-x1,y2-y1)] co (x2-x1,y2-y1) x2-x1 x2 x1 y2-y1 y2 y1 1 ans = 10**9 ans 10**9 10 9 for num in co.values():
    ans = min(ans,n-num) num co.values() co.values co values ans = min(ans,n-num) ans min(ans,n-num) min ans n-num n num print(ans) print ans ma = lambda :map(int,input().split()) lambda :map(int,input().split()) ma x1,y1 = xy[i] xy[i] x1 tma = lambda :tuple(map(int,input().split())) lambda :tuple(map(int,input().split())) tma ans = 10**9 10**9 ans lma = lambda :list(map(int,input().split())) lambda :list(map(int,input().split())) lma ni = lambda:int(input()) lambda:int(input()) ni n = ni() ni() n x2,y2 = xy[j] xy[j] x2 co = collections.Counter() collections.Counter() co ans = min(ans,n-num) min(ans,n-num) ans xy = [] [] xy y1 = xy[i] xy[i] y1 y2 = xy[j] xy[j] y2 yn = lambda fl:print("Yes") if fl else print("No") lambda fl:print("Yes") if fl else print("No") yn
ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq
n = ni()
if n==1:
    print(1)
    exit()
xy = []
for i in range(n):
    xy.append(tma())
co = collections.Counter()

for i in range(n):
    for j in range(n):
        if i==j:
            continue
        x1,y1 = xy[i]
        x2,y2 = xy[j]
        co[(x2-x1,y2-y1)] +=1

ans = 10**9
for num in co.values():
    ans = min(ans,n-num)
print(ans)
