from itertools import combinations


def main():
    N = int(input())
    points = [list(map(int, input().split())) for _ in range(N)]
    ans = N
    for i, j in combinations(range(N), 2):
        p1, p2 = points[i], points[j]
        if p1 == p2:
            continue
        dx, dy = p1[0] - p2[0], p1[1] - p2[1]
        cost = N
        for k, l in combinations(range(N), 2):
            p3, p4 = points[k], points[l]
            if (p3[0] + dx == p4[0] and p3[1] + dy == p4[1]) or \
                    (p4[0] + dx == p3[0] and p4[1] + dy == p3[1]):
                cost -= 1
        ans = min(ans, cost)
    print(ans)


if __name__ == '__main__':
    main() from itertools import combinations def main():
    N = int(input())
    points = [list(map(int, input().split())) for _ in range(N)]
    ans = N
    for i, j in combinations(range(N), 2):
        p1, p2 = points[i], points[j]
        if p1 == p2:
            continue
        dx, dy = p1[0] - p2[0], p1[1] - p2[1]
        cost = N
        for k, l in combinations(range(N), 2):
            p3, p4 = points[k], points[l]
            if (p3[0] + dx == p4[0] and p3[1] + dy == p4[1]) or \
                    (p4[0] + dx == p3[0] and p4[1] + dy == p3[1]):
                cost -= 1
        ans = min(ans, cost)
    print(ans) main N = int(input()) N int(input()) int input() input list(map(int, input().split())) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split points = [list(map(int, input().split())) for _ in range(N)] points [list(map(int, input().split())) for _ in range(N)] ans = N ans N for i, j in combinations(range(N), 2):
        p1, p2 = points[i], points[j]
        if p1 == p2:
            continue
        dx, dy = p1[0] - p2[0], p1[1] - p2[1]
        cost = N
        for k, l in combinations(range(N), 2):
            p3, p4 = points[k], points[l]
            if (p3[0] + dx == p4[0] and p3[1] + dy == p4[1]) or \
                    (p4[0] + dx == p3[0] and p4[1] + dy == p3[1]):
                cost -= 1
        ans = min(ans, cost)
     i j combinations(range(N), 2) combinations range(N) range N 2 p1, p2 = points[i], points[j] p1 points[i] points i p2 points[j] points j if p1 == p2:
            continue
         p1 == p2 p1 p2 continue dx, dy = p1[0] - p2[0], p1[1] - p2[1] dx p1[0] - p2[0] p1[0] p1 0 p2[0] p2 0 dy p1[1] - p2[1] p1[1] p1 1 p2[1] p2 1 cost = N cost N for k, l in combinations(range(N), 2):
            p3, p4 = points[k], points[l]
            if (p3[0] + dx == p4[0] and p3[1] + dy == p4[1]) or \
                    (p4[0] + dx == p3[0] and p4[1] + dy == p3[1]):
                cost -= 1
         k l combinations(range(N), 2) combinations range(N) range N 2 p3, p4 = points[k], points[l] p3 points[k] points k p4 points[l] points l if (p3[0] + dx == p4[0] and p3[1] + dy == p4[1]) or \
                    (p4[0] + dx == p3[0] and p4[1] + dy == p3[1]):
                cost -= 1
         (p3[0] + dx == p4[0] and p3[1] + dy == p4[1]) or \
                    (p4[0] + dx == p3[0] and p4[1] + dy == p3[1]) p3[0] + dx == p4[0] and p3[1] + dy == p4[1] p3[0] + dx == p4[0] p3[0] + dx p3[0] p3 0 dx p4[0] p4 0 p3[1] + dy == p4[1] p3[1] + dy p3[1] p3 1 dy p4[1] p4 1 p4[0] + dx == p3[0] and p4[1] + dy == p3[1] p4[0] + dx == p3[0] p4[0] + dx p4[0] p4 0 dx p3[0] p3 0 p4[1] + dy == p3[1] p4[1] + dy p4[1] p4 1 dy p3[1] p3 1 cost -= 1 cost 1 ans = min(ans, cost) ans min(ans, cost) min ans cost print(ans) print ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N = int(input())
    points = [list(map(int, input().split())) for _ in range(N)]
    ans = N
    for i, j in combinations(range(N), 2):
        p1, p2 = points[i], points[j]
        if p1 == p2:
            continue
        dx, dy = p1[0] - p2[0], p1[1] - p2[1]
        cost = N
        for k, l in combinations(range(N), 2):
            p3, p4 = points[k], points[l]
            if (p3[0] + dx == p4[0] and p3[1] + dy == p4[1]) or \
                    (p4[0] + dx == p3[0] and p4[1] + dy == p3[1]):
                cost -= 1
        ans = min(ans, cost)
    print(ans) def main():
    N = int(input())
    points = [list(map(int, input().split())) for _ in range(N)]
    ans = N
    for i, j in combinations(range(N), 2):
        p1, p2 = points[i], points[j]
        if p1 == p2:
            continue
        dx, dy = p1[0] - p2[0], p1[1] - p2[1]
        cost = N
        for k, l in combinations(range(N), 2):
            p3, p4 = points[k], points[l]
            if (p3[0] + dx == p4[0] and p3[1] + dy == p4[1]) or \
                    (p4[0] + dx == p3[0] and p4[1] + dy == p3[1]):
                cost -= 1
        ans = min(ans, cost)
    print(ans) main
from itertools import combinations


def main():
    N = int(input())
    points = [list(map(int, input().split())) for _ in range(N)]
    ans = N
    for i, j in combinations(range(N), 2):
        p1, p2 = points[i], points[j]
        if p1 == p2:
            continue
        dx, dy = p1[0] - p2[0], p1[1] - p2[1]
        cost = N
        for k, l in combinations(range(N), 2):
            p3, p4 = points[k], points[l]
            if (p3[0] + dx == p4[0] and p3[1] + dy == p4[1]) or \
                    (p4[0] + dx == p3[0] and p4[1] + dy == p3[1]):
                cost -= 1
        ans = min(ans, cost)
    print(ans)


if __name__ == '__main__':
    main()
