from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()
x = [LIST() for i in range(n)]
 
a = []
for i in range(n):
    for j in range(n):
        if i != j:
            a.append((x[j][0]-x[i][0], x[j][1]-x[i][1]))
 
a.sort()
count = 1
reg = 1

for i in range(1, len(a)):
    if a[i][:] == a[i-1][:]:
        count += 1
        reg = max(reg, count)
    else:
        count = 1

if n == 1:
    ans = n
else:
    ans = n - reg

print(ans) from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement from collections import deque,defaultdict,Counter from bisect import bisect_left,bisect_right from operator import itemgetter from heapq import heapify,heappop,heappush from queue import Queue,LifoQueue,PriorityQueue from copy import deepcopy from time import time import string string import sys sys sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 def input() : return sys.stdin.readline().strip() input def INT()   : return int(input()) INT def MAP()   : return map(int,input().split()) MAP def LIST()  : return list(MAP()) LIST n = INT() n INT() INT LIST() for i in range(n) for i in range(n) i range(n) range n for i in range(n) LIST() LIST x = [LIST() for i in range(n)] x [LIST() for i in range(n)] a = [] a [] for i in range(n):
    for j in range(n):
        if i != j:
            a.append((x[j][0]-x[i][0], x[j][1]-x[i][1]))
  i range(n) range n for j in range(n):
        if i != j:
            a.append((x[j][0]-x[i][0], x[j][1]-x[i][1]))
  j range(n) range n if i != j:
            a.append((x[j][0]-x[i][0], x[j][1]-x[i][1]))
  i != j i j a.append((x[j][0]-x[i][0], x[j][1]-x[i][1])) a.append a append (x[j][0]-x[i][0], x[j][1]-x[i][1]) x[j][0]-x[i][0] x[j][0] [j] x j 0 x[i][0] [i] x i 0 x[j][1]-x[i][1] x[j][1] [j] x j 1 x[i][1] [i] x i 1 a.sort() a.sort a sort count = 1 count 1 reg = 1 reg 1 for i in range(1, len(a)):
    if a[i][:] == a[i-1][:]:
        count += 1
        reg = max(reg, count)
    else:
        count = 1 i range(1, len(a)) range 1 len(a) len a if a[i][:] == a[i-1][:]:
        count += 1
        reg = max(reg, count)
    else:
        count = 1 a[i][:] == a[i-1][:] a[i][:] [i] a i : a[i-1][:] [i-1] a i-1 i 1 : count += 1 count 1 reg = max(reg, count) reg max(reg, count) max reg count count = 1 count 1 if n == 1:
    ans = n
else:
    ans = n - reg n == 1 n 1 ans = n ans n ans = n - reg ans n - reg n reg print(ans) print ans count += 1 1 count def INT()   : return int(input()) def INT()   : return int(input()) INT n = INT() INT() n ans = n n ans count = 1 1 count def LIST()  : return list(MAP()) def LIST()  : return list(MAP()) LIST def input() : return sys.stdin.readline().strip() def input() : return sys.stdin.readline().strip() input reg = 1 1 reg a = [] [] a def MAP()   : return map(int,input().split()) def MAP()   : return map(int,input().split()) MAP x = [LIST() for i in range(n)] [LIST() for i in range(n)] x count = 1 1 count ans = n - reg n - reg ans reg = max(reg, count) max(reg, count) reg
from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()
x = [LIST() for i in range(n)]
 
a = []
for i in range(n):
    for j in range(n):
        if i != j:
            a.append((x[j][0]-x[i][0], x[j][1]-x[i][1]))
 
a.sort()
count = 1
reg = 1

for i in range(1, len(a)):
    if a[i][:] == a[i-1][:]:
        count += 1
        reg = max(reg, count)
    else:
        count = 1

if n == 1:
    ans = n
else:
    ans = n - reg

print(ans)