from sys import stdin
from itertools import combinations
from collections import Counter
n = int(stdin.readline().rstrip())
li = [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)]
lin = list(combinations(li,2))
sa = []
for i,j in lin:
    p = i[0]-j[0]
    q = i[1]-j[1]
    sa.append((p,q))
    sa.append((-p,-q))
san = Counter(sa)
if n >= 2:
    print(n-max(san.values()))
else:
    print(1) from sys import stdin from itertools import combinations from collections import Counter n = int(stdin.readline().rstrip()) n int(stdin.readline().rstrip()) int stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip list(map(int,stdin.readline().rstrip().split())) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) list(map(int,stdin.readline().rstrip().split())) list map(int,stdin.readline().rstrip().split()) map int stdin.readline().rstrip().split() stdin.readline().rstrip().split stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip split li = [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)] li [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)] lin = list(combinations(li,2)) lin list(combinations(li,2)) list combinations(li,2) combinations li 2 sa = [] sa [] for i,j in lin:
    p = i[0]-j[0]
    q = i[1]-j[1]
    sa.append((p,q))
    sa.append((-p,-q)) i j lin 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 sa.append((p,q)) sa.append sa append (p,q) p q sa.append((-p,-q)) sa.append sa append (-p,-q) -p p -q q san = Counter(sa) san Counter(sa) Counter sa if n >= 2:
    print(n-max(san.values()))
else:
    print(1) n >= 2 n 2 print(n-max(san.values())) print n-max(san.values()) n max(san.values()) max san.values() san.values san values print(1) print 1 lin = list(combinations(li,2)) list(combinations(li,2)) lin p = i[0]-j[0] i[0]-j[0] p san = Counter(sa) Counter(sa) san n = int(stdin.readline().rstrip()) int(stdin.readline().rstrip()) n li = [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)] [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)] li q = i[1]-j[1] i[1]-j[1] q sa = [] [] sa
from sys import stdin
from itertools import combinations
from collections import Counter
n = int(stdin.readline().rstrip())
li = [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)]
lin = list(combinations(li,2))
sa = []
for i,j in lin:
    p = i[0]-j[0]
    q = i[1]-j[1]
    sa.append((p,q))
    sa.append((-p,-q))
san = Counter(sa)
if n >= 2:
    print(n-max(san.values()))
else:
    print(1)