from collections import defaultdict

n = int(input())
l = [list(map(int,input().split())) for i in range(n)]
if n == 1:
    print(1)
    exit()
d = defaultdict(int)
for i in range(n):
    for j in range(n):
        if i== j:
            continue
        a,b = l[i]
        c,e = l[j]
        d[(a-c,b-e)] += 1
ans = n
m = max(d.values())
for i,j in d.items():
    if j != m:
        continue

    x,y = i
    if x==0 and y == 0:
        continue
    count = 0
    for c,d in l:
        if [c+x,d+y] in l:
            count += 1
    ans = min(ans,n-count)
print(ans) from collections import defaultdict n = int(input()) n int(input()) int input() input list(map(int,input().split())) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split l = [list(map(int,input().split())) for i in range(n)] l [list(map(int,input().split())) for i in range(n)] if n == 1:
    print(1)
    exit() n == 1 n 1 print(1) print 1 exit() exit d = defaultdict(int) d defaultdict(int) defaultdict int for i in range(n):
    for j in range(n):
        if i== j:
            continue
        a,b = l[i]
        c,e = l[j]
        d[(a-c,b-e)] += 1 i range(n) range n for j in range(n):
        if i== j:
            continue
        a,b = l[i]
        c,e = l[j]
        d[(a-c,b-e)] += 1 j range(n) range n if i== j:
            continue
         i== j i j continue a,b = l[i] a l[i] l i b c,e = l[j] c l[j] l j e d[(a-c,b-e)] += 1 d[(a-c,b-e)] d (a-c,b-e) a-c a c b-e b e 1 ans = n ans n m = max(d.values()) m max(d.values()) max d.values() d.values d values for i,j in d.items():
    if j != m:
        continue

    x,y = i
    if x==0 and y == 0:
        continue
    count = 0
    for c,d in l:
        if [c+x,d+y] in l:
            count += 1
    ans = min(ans,n-count) i j d.items() d.items d items if j != m:
        continue

     j != m j m continue x,y = i x i y if x==0 and y == 0:
        continue
     x==0 and y == 0 x==0 x 0 y == 0 y 0 continue count = 0 count 0 for c,d in l:
        if [c+x,d+y] in l:
            count += 1
     c d l if [c+x,d+y] in l:
            count += 1
     [c+x,d+y] in l [c+x,d+y] c+x c x d+y d y l count += 1 count 1 ans = min(ans,n-count) ans min(ans,n-count) min ans n-count n count print(ans) print ans b = l[i] l[i] b c,e = l[j] l[j] c ans = min(ans,n-count) min(ans,n-count) ans ans = n n ans m = max(d.values()) max(d.values()) m a,b = l[i] l[i] a y = i i y n = int(input()) int(input()) n x,y = i i x d = defaultdict(int) defaultdict(int) d count = 0 0 count l = [list(map(int,input().split())) for i in range(n)] [list(map(int,input().split())) for i in range(n)] l count += 1 1 count e = l[j] l[j] e
from collections import defaultdict

n = int(input())
l = [list(map(int,input().split())) for i in range(n)]
if n == 1:
    print(1)
    exit()
d = defaultdict(int)
for i in range(n):
    for j in range(n):
        if i== j:
            continue
        a,b = l[i]
        c,e = l[j]
        d[(a-c,b-e)] += 1
ans = n
m = max(d.values())
for i,j in d.items():
    if j != m:
        continue

    x,y = i
    if x==0 and y == 0:
        continue
    count = 0
    for c,d in l:
        if [c+x,d+y] in l:
            count += 1
    ans = min(ans,n-count)
print(ans)