from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n = inp()
a = [inpl() for i in range(n)]
a.sort(key=lambda x:x[1])
a.sort()
z = []
# pprint.pprint(a)
for i in range(n):
    for j in range(i,n):
        if i == j:
            continue
        z.append((a[i][0]-a[j][0], a[i][1]-a[j][1]))
c = Counter(z)
# pprint.pprint(c)
if n == 1:
    print(1)
else:
    print(n-c.most_common()[0][1])
# print(n-c.most_common()[0][1])
 from collections import Counter,defaultdict,deque from heapq import heappop,heappush,heapify import sys,bisect,math,itertools,pprint sys bisect math itertools pprint sys.setrecursionlimit(10**8) sys.setrecursionlimit sys setrecursionlimit 10**8 10 8 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 def inp(): return int(sys.stdin.readline()) inp def inpl(): return list(map(int, sys.stdin.readline().split())) inpl def inpln(n): return list(int(sys.stdin.readline()) for i in range(n)) inpln n n n = inp() n inp() inp inpl() for i in range(n) for i in range(n) i range(n) range n for i in range(n) inpl() inpl a = [inpl() for i in range(n)] a [inpl() for i in range(n)] a.sort(key=lambda x:x[1]) a.sort a sort key=lambda x:x[1] key lambda x:x[1] x[1] x 1 x a.sort() a.sort a sort z = [] z [] for i in range(n):
    for j in range(i,n):
        if i == j:
            continue
        z.append((a[i][0]-a[j][0], a[i][1]-a[j][1])) i range(n) range n for j in range(i,n):
        if i == j:
            continue
        z.append((a[i][0]-a[j][0], a[i][1]-a[j][1])) j range(i,n) range i n if i == j:
            continue
         i == j i j continue z.append((a[i][0]-a[j][0], a[i][1]-a[j][1])) z.append z append (a[i][0]-a[j][0], a[i][1]-a[j][1]) a[i][0]-a[j][0] a[i][0] [i] a i 0 a[j][0] [j] a j 0 a[i][1]-a[j][1] a[i][1] [i] a i 1 a[j][1] [j] a j 1 c = Counter(z) c Counter(z) Counter z if n == 1:
    print(1)
else:
    print(n-c.most_common()[0][1])
# print(n-c.most_common()[0][1]) n == 1 n 1 print(1) print 1 print(n-c.most_common()[0][1]) print n-c.most_common()[0][1] n c.most_common()[0][1] [0] c.most_common() c.most_common c most_common 0 1 def inpln(n): return list(int(sys.stdin.readline()) for i in range(n)) def inpln(n): return list(int(sys.stdin.readline()) for i in range(n)) inpln n = inp() inp() n mod = 10**9+7 10**9+7 mod def inp(): return int(sys.stdin.readline()) def inp(): return int(sys.stdin.readline()) inp c = Counter(z) Counter(z) c def inpl(): return list(map(int, sys.stdin.readline().split())) def inpl(): return list(map(int, sys.stdin.readline().split())) inpl z = [] [] z a = [inpl() for i in range(n)] [inpl() for i in range(n)] a
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n = inp()
a = [inpl() for i in range(n)]
a.sort(key=lambda x:x[1])
a.sort()
z = []
# pprint.pprint(a)
for i in range(n):
    for j in range(i,n):
        if i == j:
            continue
        z.append((a[i][0]-a[j][0], a[i][1]-a[j][1]))
c = Counter(z)
# pprint.pprint(c)
if n == 1:
    print(1)
else:
    print(n-c.most_common()[0][1])
# print(n-c.most_common()[0][1])

