import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
'''
#Pythonを用いる場合
#numpy 1.18.0, scipy 1.4.1, scikit-learn 0.22, numba 0.47.0, networkx 2.4
 
import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix
'''
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

n=ii()

arr=[list(mii()) for _ in range(n)]

chk={}

for i in arr:
    for j in arr:
        if i!=j:
            p=i[0]-j[0]
            q=i[1]-j[1]

            if str(p)+","+str(q) in chk:
                chk[str(p)+","+str(q)]+=1
            else:
                chk[str(p)+","+str(q)]=1

places="w"
num=0

for i,j in chk.items():
    if j>num:
        num=j
        places=i

print(n-num) import sys sys sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 from math import floor,ceil,sqrt,factorial,log from heapq import heappop, heappush, heappushpop from collections import Counter,defaultdict,deque from itertools import accumulate,permutations,combinations,product,combinations_with_replacement from bisect import bisect_left,bisect_right from copy import deepcopy from operator import itemgetter from fractions import gcd mod = 10 ** 9 + 7 mod 10 ** 9 + 7 10 ** 9 10 9 7 inf = float('inf') inf float('inf') float 'inf' ninf = -float('inf') ninf -float('inf') float('inf') float 'inf' '''
#Pythonを用いる場合
#numpy 1.18.0, scipy 1.4.1, scikit-learn 0.22, numba 0.47.0, networkx 2.4
 
import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix
''' def ii(): return int(sys.stdin.readline().rstrip()) #int(input()) ii def mii(): return map(int,sys.stdin.readline().rstrip().split()) mii def limii(): return list(mii()) #list(map(int,input().split())) limii ii() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) ii() ii def lin(n:int): return [ii() for _ in range(n)] lin n:int n limii() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) limii() limii def llint(n: int): return [limii() for _ in range(n)]
#文字列input llint n: int n def ss(): return sys.stdin.readline().rstrip() #input() ss def mss(): return sys.stdin.readline().rstrip().split() mss def limss(): return list(mss()) #list(input().split()) limss ss() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) ss() ss def lst(n:int): return [ss() for _ in range(n)] lst n:int n limss() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) limss() limss def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？ llstr n: int n n=ii() n ii() ii list(mii()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) list(mii()) list mii() mii arr=[list(mii()) for _ in range(n)] arr [list(mii()) for _ in range(n)] chk={} chk {} for i in arr:
    for j in arr:
        if i!=j:
            p=i[0]-j[0]
            q=i[1]-j[1]

            if str(p)+","+str(q) in chk:
                chk[str(p)+","+str(q)]+=1
            else:
                chk[str(p)+","+str(q)]=1 i arr for j in arr:
        if i!=j:
            p=i[0]-j[0]
            q=i[1]-j[1]

            if str(p)+","+str(q) in chk:
                chk[str(p)+","+str(q)]+=1
            else:
                chk[str(p)+","+str(q)]=1 j arr if i!=j:
            p=i[0]-j[0]
            q=i[1]-j[1]

            if str(p)+","+str(q) in chk:
                chk[str(p)+","+str(q)]+=1
            else:
                chk[str(p)+","+str(q)]=1 i!=j i j p=i[0]-j[0] p i[0]-j[0] i[0] i 0 j[0] j 0 q=i[1]-j[1] q i[1]-j[1] i[1] i 1 j[1] j 1 if str(p)+","+str(q) in chk:
                chk[str(p)+","+str(q)]+=1
            else:
                chk[str(p)+","+str(q)]=1 str(p)+","+str(q) in chk str(p)+","+str(q) str(p)+"," str(p) str p "," str(q) str q chk chk[str(p)+","+str(q)]+=1 chk[str(p)+","+str(q)] chk str(p)+","+str(q) str(p)+"," str(p) str p "," str(q) str q 1 chk[str(p)+","+str(q)]=1 chk[str(p)+","+str(q)] chk str(p)+","+str(q) str(p)+"," str(p) str p "," str(q) str q 1 places="w" places "w" num=0 num 0 for i,j in chk.items():
    if j>num:
        num=j
        places=i i j chk.items() chk.items chk items if j>num:
        num=j
        places=i j>num j num num=j num j places=i places i print(n-num) print n-num n num mod = 10 ** 9 + 7 10 ** 9 + 7 mod def limii(): return list(mii()) #list(map(int,input().split())) def limii(): return list(mii()) #list(map(int,input().split())) limii def mss(): return sys.stdin.readline().rstrip().split() def mss(): return sys.stdin.readline().rstrip().split() mss def limss(): return list(mss()) #list(input().split()) def limss(): return list(mss()) #list(input().split()) limss num=j j num def mii(): return map(int,sys.stdin.readline().rstrip().split()) def mii(): return map(int,sys.stdin.readline().rstrip().split()) mii places="w" "w" places chk={} {} chk p=i[0]-j[0] i[0]-j[0] p num=0 0 num arr=[list(mii()) for _ in range(n)] [list(mii()) for _ in range(n)] arr def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？ def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？ llstr def lst(n:int): return [ss() for _ in range(n)] def lst(n:int): return [ss() for _ in range(n)] lst n=ii() ii() n places=i i places ninf = -float('inf') -float('inf') ninf def ii(): return int(sys.stdin.readline().rstrip()) #int(input()) def ii(): return int(sys.stdin.readline().rstrip()) #int(input()) ii q=i[1]-j[1] i[1]-j[1] q def lin(n:int): return [ii() for _ in range(n)] def lin(n:int): return [ii() for _ in range(n)] lin inf = float('inf') float('inf') inf def ss(): return sys.stdin.readline().rstrip() #input() def ss(): return sys.stdin.readline().rstrip() #input() ss def llint(n: int): return [limii() for _ in range(n)]
#文字列input def llint(n: int): return [limii() for _ in range(n)]
#文字列input llint
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
'''
#Pythonを用いる場合
#numpy 1.18.0, scipy 1.4.1, scikit-learn 0.22, numba 0.47.0, networkx 2.4
 
import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix
'''
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

n=ii()

arr=[list(mii()) for _ in range(n)]

chk={}

for i in arr:
    for j in arr:
        if i!=j:
            p=i[0]-j[0]
            q=i[1]-j[1]

            if str(p)+","+str(q) in chk:
                chk[str(p)+","+str(q)]+=1
            else:
                chk[str(p)+","+str(q)]=1

places="w"
num=0

for i,j in chk.items():
    if j>num:
        num=j
        places=i

print(n-num)