# ベクトルを固定して全探索まではわかる 実装がわからん
# いやべつに順番は関係ないのか？ 「残っているボールを 1つ選んで回収する。」

n = int(input())
if n == 1:
    print(1)  # 「ただし、1つ目に選んだボールについては必ずコスト 1かかる。」
    exit()
points = []
for _ in range(n):
    points.append(list(map(int, input().split())))

ans = 10**18
for p in range(n):
    for q in range(n):
        if p == q:
            continue
        vector = [points[p][0] - points[q][0], points[p][1] - points[q][1]]
        tmp = 0
        for i in range(n):
            for j in range(n):
                if i == j:
                    continue
                if points[i][0] - points[j][0] == vector[
                        0] and points[i][1] - points[j][1] == vector[1]:
                    tmp += 1

        ans = min(ans, n - tmp)

print(ans) n = int(input()) n int(input()) int input() input if n == 1:
    print(1)  # 「ただし、1つ目に選んだボールについては必ずコスト 1かかる。」
    exit() n == 1 n 1 print(1) print 1 exit() exit points = [] points [] for _ in range(n):
    points.append(list(map(int, input().split()))) _ range(n) range n points.append(list(map(int, input().split()))) points.append points append list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split ans = 10**18 ans 10**18 10 18 for p in range(n):
    for q in range(n):
        if p == q:
            continue
        vector = [points[p][0] - points[q][0], points[p][1] - points[q][1]]
        tmp = 0
        for i in range(n):
            for j in range(n):
                if i == j:
                    continue
                if points[i][0] - points[j][0] == vector[
                        0] and points[i][1] - points[j][1] == vector[1]:
                    tmp += 1

        ans = min(ans, n - tmp) p range(n) range n for q in range(n):
        if p == q:
            continue
        vector = [points[p][0] - points[q][0], points[p][1] - points[q][1]]
        tmp = 0
        for i in range(n):
            for j in range(n):
                if i == j:
                    continue
                if points[i][0] - points[j][0] == vector[
                        0] and points[i][1] - points[j][1] == vector[1]:
                    tmp += 1

        ans = min(ans, n - tmp) q range(n) range n if p == q:
            continue
         p == q p q continue vector = [points[p][0] - points[q][0], points[p][1] - points[q][1]] vector [points[p][0] - points[q][0], points[p][1] - points[q][1]] points[p][0] - points[q][0] points[p][0] [p] points p 0 points[q][0] [q] points q 0 points[p][1] - points[q][1] points[p][1] [p] points p 1 points[q][1] [q] points q 1 tmp = 0 tmp 0 for i in range(n):
            for j in range(n):
                if i == j:
                    continue
                if points[i][0] - points[j][0] == vector[
                        0] and points[i][1] - points[j][1] == vector[1]:
                    tmp += 1

         i range(n) range n for j in range(n):
                if i == j:
                    continue
                if points[i][0] - points[j][0] == vector[
                        0] and points[i][1] - points[j][1] == vector[1]:
                    tmp += 1

         j range(n) range n if i == j:
                    continue
                 i == j i j continue if points[i][0] - points[j][0] == vector[
                        0] and points[i][1] - points[j][1] == vector[1]:
                    tmp += 1

         points[i][0] - points[j][0] == vector[
                        0] and points[i][1] - points[j][1] == vector[1] points[i][0] - points[j][0] == vector[
                        0] points[i][0] - points[j][0] points[i][0] [i] points i 0 points[j][0] [j] points j 0 vector[
                        0] vector 0 points[i][1] - points[j][1] == vector[1] points[i][1] - points[j][1] points[i][1] [i] points i 1 points[j][1] [j] points j 1 vector[1] vector 1 tmp += 1 tmp 1 ans = min(ans, n - tmp) ans min(ans, n - tmp) min ans n - tmp n tmp print(ans) print ans vector = [points[p][0] - points[q][0], points[p][1] - points[q][1]] [points[p][0] - points[q][0], points[p][1] - points[q][1]] vector tmp = 0 0 tmp ans = min(ans, n - tmp) min(ans, n - tmp) ans n = int(input()) int(input()) n ans = 10**18 10**18 ans points = [] [] points tmp += 1 1 tmp
# ベクトルを固定して全探索まではわかる 実装がわからん
# いやべつに順番は関係ないのか？ 「残っているボールを 1つ選んで回収する。」

n = int(input())
if n == 1:
    print(1)  # 「ただし、1つ目に選んだボールについては必ずコスト 1かかる。」
    exit()
points = []
for _ in range(n):
    points.append(list(map(int, input().split())))

ans = 10**18
for p in range(n):
    for q in range(n):
        if p == q:
            continue
        vector = [points[p][0] - points[q][0], points[p][1] - points[q][1]]
        tmp = 0
        for i in range(n):
            for j in range(n):
                if i == j:
                    continue
                if points[i][0] - points[j][0] == vector[
                        0] and points[i][1] - points[j][1] == vector[1]:
                    tmp += 1

        ans = min(ans, n - tmp)

print(ans)