from collections import Counter
N = int(input())
P = list(tuple(map(int, input().split())) for _ in range(N))
P = sorted(P)

p_q_cand = []
for i in range(N):
    for j in range(i+1, N):
        diff_p = P[j][0]-P[i][0]
        diff_q = P[j][1]-P[i][1]
        p_q_cand.append((diff_p, diff_q))

if N == 1:
    print(1)
else:
    C = Counter(p_q_cand)
    ans = float('inf')
    for v, c in C.items():
        p = v[0]
        q = v[1]
        tmp = 0
        used = set()
        for a, b in sorted(list(P), key=lambda x: (x[0], x[1])):
            if (a-p, b-q) not in used:
                tmp += 1
            used.add((a, b))
        ans = min(ans, tmp)
    print(ans) from collections import Counter N = int(input()) N int(input()) int input() input P = list(tuple(map(int, input().split())) for _ in range(N)) P list(tuple(map(int, input().split())) for _ in range(N)) list tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split P = sorted(P) P sorted(P) sorted P p_q_cand = [] p_q_cand [] for i in range(N):
    for j in range(i+1, N):
        diff_p = P[j][0]-P[i][0]
        diff_q = P[j][1]-P[i][1]
        p_q_cand.append((diff_p, diff_q)) i range(N) range N for j in range(i+1, N):
        diff_p = P[j][0]-P[i][0]
        diff_q = P[j][1]-P[i][1]
        p_q_cand.append((diff_p, diff_q)) j range(i+1, N) range i+1 i 1 N diff_p = P[j][0]-P[i][0] diff_p P[j][0]-P[i][0] P[j][0] [j] P j 0 P[i][0] [i] P i 0 diff_q = P[j][1]-P[i][1] diff_q P[j][1]-P[i][1] P[j][1] [j] P j 1 P[i][1] [i] P i 1 p_q_cand.append((diff_p, diff_q)) p_q_cand.append p_q_cand append (diff_p, diff_q) diff_p diff_q if N == 1:
    print(1)
else:
    C = Counter(p_q_cand)
    ans = float('inf')
    for v, c in C.items():
        p = v[0]
        q = v[1]
        tmp = 0
        used = set()
        for a, b in sorted(list(P), key=lambda x: (x[0], x[1])):
            if (a-p, b-q) not in used:
                tmp += 1
            used.add((a, b))
        ans = min(ans, tmp)
    print(ans) N == 1 N 1 print(1) print 1 C = Counter(p_q_cand) C Counter(p_q_cand) Counter p_q_cand ans = float('inf') ans float('inf') float 'inf' for v, c in C.items():
        p = v[0]
        q = v[1]
        tmp = 0
        used = set()
        for a, b in sorted(list(P), key=lambda x: (x[0], x[1])):
            if (a-p, b-q) not in used:
                tmp += 1
            used.add((a, b))
        ans = min(ans, tmp)
     v c C.items() C.items C items p = v[0] p v[0] v 0 q = v[1] q v[1] v 1 tmp = 0 tmp 0 used = set() used set() set for a, b in sorted(list(P), key=lambda x: (x[0], x[1])):
            if (a-p, b-q) not in used:
                tmp += 1
            used.add((a, b))
         a b sorted(list(P), key=lambda x: (x[0], x[1])) sorted list(P) list P key=lambda x: (x[0], x[1]) key lambda x: (x[0], x[1]) (x[0], x[1]) x[0] x 0 x[1] x 1 x if (a-p, b-q) not in used:
                tmp += 1
             (a-p, b-q) not in used (a-p, b-q) a-p a p b-q b q used tmp += 1 tmp 1 used.add((a, b)) used.add used add (a, b) a b ans = min(ans, tmp) ans min(ans, tmp) min ans tmp print(ans) print ans p_q_cand = [] [] p_q_cand p = v[0] v[0] p q = v[1] v[1] q N = int(input()) int(input()) N diff_q = P[j][1]-P[i][1] P[j][1]-P[i][1] diff_q ans = min(ans, tmp) min(ans, tmp) ans P = sorted(P) sorted(P) P ans = float('inf') float('inf') ans P = list(tuple(map(int, input().split())) for _ in range(N)) list(tuple(map(int, input().split())) for _ in range(N)) P tmp += 1 1 tmp used = set() set() used C = Counter(p_q_cand) Counter(p_q_cand) C diff_p = P[j][0]-P[i][0] P[j][0]-P[i][0] diff_p tmp = 0 0 tmp
from collections import Counter
N = int(input())
P = list(tuple(map(int, input().split())) for _ in range(N))
P = sorted(P)

p_q_cand = []
for i in range(N):
    for j in range(i+1, N):
        diff_p = P[j][0]-P[i][0]
        diff_q = P[j][1]-P[i][1]
        p_q_cand.append((diff_p, diff_q))

if N == 1:
    print(1)
else:
    C = Counter(p_q_cand)
    ans = float('inf')
    for v, c in C.items():
        p = v[0]
        q = v[1]
        tmp = 0
        used = set()
        for a, b in sorted(list(P), key=lambda x: (x[0], x[1])):
            if (a-p, b-q) not in used:
                tmp += 1
            used.add((a, b))
        ans = min(ans, tmp)
    print(ans)
