# -*- coding: utf-8 -*-
N = int(input())

if N == 1:
    print(1)
    exit()

#
X, Y = [], []
for _ in range(N):
    x, y = map(int, input().split(' '))
    X.append(x)
    Y.append(y)

#
import collections
xy_frq_dict = collections.defaultdict(int)
for i in range(N):
    for j in range(N):
        if i == j:
            continue

        x, y = X[i] - X[j], Y[i] - Y[j]
        xy_frq_dict[(x, y)] += 1

xy_frq_pairs = list(xy_frq_dict.items())
xy_frq_pairs.sort(key=lambda x: x[1])
ret = N - xy_frq_pairs[-1][1]
print(ret)


 N = int(input()) N int(input()) int input() input if N == 1:
    print(1)
    exit()

# N == 1 N 1 print(1) print 1 exit() exit X, Y = [], [] X [] Y [] for _ in range(N):
    x, y = map(int, input().split(' '))
    X.append(x)
    Y.append(y)

# _ range(N) range N x, y = map(int, input().split(' ')) x map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' y X.append(x) X.append X append x Y.append(y) Y.append Y append y import collections collections xy_frq_dict = collections.defaultdict(int) xy_frq_dict collections.defaultdict(int) collections.defaultdict collections defaultdict int for i in range(N):
    for j in range(N):
        if i == j:
            continue

        x, y = X[i] - X[j], Y[i] - Y[j]
        xy_frq_dict[(x, y)] += 1 i range(N) range N for j in range(N):
        if i == j:
            continue

        x, y = X[i] - X[j], Y[i] - Y[j]
        xy_frq_dict[(x, y)] += 1 j range(N) range N if i == j:
            continue

         i == j i j continue x, y = X[i] - X[j], Y[i] - Y[j] x X[i] - X[j] X[i] X i X[j] X j y Y[i] - Y[j] Y[i] Y i Y[j] Y j xy_frq_dict[(x, y)] += 1 xy_frq_dict[(x, y)] xy_frq_dict (x, y) x y 1 xy_frq_pairs = list(xy_frq_dict.items()) xy_frq_pairs list(xy_frq_dict.items()) list xy_frq_dict.items() xy_frq_dict.items xy_frq_dict items xy_frq_pairs.sort(key=lambda x: x[1]) xy_frq_pairs.sort xy_frq_pairs sort key=lambda x: x[1] key lambda x: x[1] x[1] x 1 x ret = N - xy_frq_pairs[-1][1] ret N - xy_frq_pairs[-1][1] N xy_frq_pairs[-1][1] [-1] xy_frq_pairs -1 1 print(ret) print ret y = map(int, input().split(' ')) map(int, input().split(' ')) y y = X[i] - X[j], Y[i] - Y[j] Y[i] - Y[j] y x, y = X[i] - X[j], Y[i] - Y[j] X[i] - X[j] x X, Y = [], [] [] X ret = N - xy_frq_pairs[-1][1] N - xy_frq_pairs[-1][1] ret Y = [], [] [] Y x, y = map(int, input().split(' ')) map(int, input().split(' ')) x xy_frq_pairs = list(xy_frq_dict.items()) list(xy_frq_dict.items()) xy_frq_pairs xy_frq_dict = collections.defaultdict(int) collections.defaultdict(int) xy_frq_dict N = int(input()) int(input()) N
# -*- coding: utf-8 -*-
N = int(input())

if N == 1:
    print(1)
    exit()

#
X, Y = [], []
for _ in range(N):
    x, y = map(int, input().split(' '))
    X.append(x)
    Y.append(y)

#
import collections
xy_frq_dict = collections.defaultdict(int)
for i in range(N):
    for j in range(N):
        if i == j:
            continue

        x, y = X[i] - X[j], Y[i] - Y[j]
        xy_frq_dict[(x, y)] += 1

xy_frq_pairs = list(xy_frq_dict.items())
xy_frq_pairs.sort(key=lambda x: x[1])
ret = N - xy_frq_pairs[-1][1]
print(ret)



