import collections
n = int(input())
balls = []
for _ in range(n):
    x, y = map(int, input().split())
    balls.append([x, y])
# print(balls)
delta = []
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        dx = balls[j][0] - balls[i][0]
        dy = balls[j][1] - balls[i][1]
        delta.append((dx, dy))

c_delta = collections.Counter(delta)
# print(c_delta)
if len(c_delta):
    print(n-c_delta.most_common()[0][1])
else:
    print(1) import collections collections n = int(input()) n int(input()) int input() input balls = [] balls [] for _ in range(n):
    x, y = map(int, input().split())
    balls.append([x, y])
# print(balls) _ range(n) range n x, y = map(int, input().split()) x map(int, input().split()) map int input().split() ().split () input split y balls.append([x, y]) balls.append balls append [x, y] x y delta = [] delta [] for i in range(n):
    for j in range(n):
        if i == j:
            continue
        dx = balls[j][0] - balls[i][0]
        dy = balls[j][1] - balls[i][1]
        delta.append((dx, dy)) i range(n) range n for j in range(n):
        if i == j:
            continue
        dx = balls[j][0] - balls[i][0]
        dy = balls[j][1] - balls[i][1]
        delta.append((dx, dy)) j range(n) range n if i == j:
            continue
         i == j i j continue dx = balls[j][0] - balls[i][0] dx balls[j][0] - balls[i][0] balls[j][0] [j] balls j 0 balls[i][0] [i] balls i 0 dy = balls[j][1] - balls[i][1] dy balls[j][1] - balls[i][1] balls[j][1] [j] balls j 1 balls[i][1] [i] balls i 1 delta.append((dx, dy)) delta.append delta append (dx, dy) dx dy c_delta = collections.Counter(delta) c_delta collections.Counter(delta) collections.Counter collections Counter delta if len(c_delta):
    print(n-c_delta.most_common()[0][1])
else:
    print(1) len(c_delta) len c_delta print(n-c_delta.most_common()[0][1]) print n-c_delta.most_common()[0][1] n c_delta.most_common()[0][1] [0] c_delta.most_common() c_delta.most_common c_delta most_common 0 1 print(1) print 1 balls = [] [] balls c_delta = collections.Counter(delta) collections.Counter(delta) c_delta delta = [] [] delta dy = balls[j][1] - balls[i][1] balls[j][1] - balls[i][1] dy n = int(input()) int(input()) n y = map(int, input().split()) map(int, input().split()) y x, y = map(int, input().split()) map(int, input().split()) x dx = balls[j][0] - balls[i][0] balls[j][0] - balls[i][0] dx
import collections
n = int(input())
balls = []
for _ in range(n):
    x, y = map(int, input().split())
    balls.append([x, y])
# print(balls)
delta = []
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        dx = balls[j][0] - balls[i][0]
        dy = balls[j][1] - balls[i][1]
        delta.append((dx, dy))

c_delta = collections.Counter(delta)
# print(c_delta)
if len(c_delta):
    print(n-c_delta.most_common()[0][1])
else:
    print(1)