from collections import Counter
import itertools as it

N=int(input())
l=[]
for i in range(N):
    l.append(tuple(map(int,input().split())))
l.sort()

if N==1:
    ans=1
else:
    d=[(c[1][0]-c[0][0],c[1][1]-c[0][1]) for c in it.combinations(l,2)]
    ans=N-max(dict(Counter(d)).values())

print(ans) from collections import Counter import itertools as it itertools N=int(input()) N int(input()) int input() input l=[] l [] for i in range(N):
    l.append(tuple(map(int,input().split()))) i range(N) range N l.append(tuple(map(int,input().split()))) l.append l append tuple(map(int,input().split())) tuple map(int,input().split()) map int input().split() ().split () input split l.sort() l.sort l sort if N==1:
    ans=1
else:
    d=[(c[1][0]-c[0][0],c[1][1]-c[0][1]) for c in it.combinations(l,2)]
    ans=N-max(dict(Counter(d)).values()) N==1 N 1 ans=1 ans 1 (c[1][0]-c[0][0],c[1][1]-c[0][1]) for c in it.combinations(l,2) for c in it.combinations(l,2) c it.combinations(l,2) it.combinations it combinations l 2 for c in it.combinations(l,2) (c[1][0]-c[0][0],c[1][1]-c[0][1]) c[1][0]-c[0][0] c[1][0] [1] c 1 0 c[0][0] [0] c 0 0 c[1][1]-c[0][1] c[1][1] [1] c 1 1 c[0][1] [0] c 0 1 d=[(c[1][0]-c[0][0],c[1][1]-c[0][1]) for c in it.combinations(l,2)] d [(c[1][0]-c[0][0],c[1][1]-c[0][1]) for c in it.combinations(l,2)] ans=N-max(dict(Counter(d)).values()) ans N-max(dict(Counter(d)).values()) N max(dict(Counter(d)).values()) max dict(Counter(d)).values() (Counter(d)).values (Counter(d)) dict Counter(d) Counter d values print(ans) print ans l=[] [] l ans=N-max(dict(Counter(d)).values()) N-max(dict(Counter(d)).values()) ans d=[(c[1][0]-c[0][0],c[1][1]-c[0][1]) for c in it.combinations(l,2)] [(c[1][0]-c[0][0],c[1][1]-c[0][1]) for c in it.combinations(l,2)] d N=int(input()) int(input()) N ans=1 1 ans
from collections import Counter
import itertools as it

N=int(input())
l=[]
for i in range(N):
    l.append(tuple(map(int,input().split())))
l.sort()

if N==1:
    ans=1
else:
    d=[(c[1][0]-c[0][0],c[1][1]-c[0][1]) for c in it.combinations(l,2)]
    ans=N-max(dict(Counter(d)).values())

print(ans)