import sys
import itertools

input = sys.stdin.readline


def main():
    N = int(input())
    balls = [tuple(map(int, input().split())) for _ in range(N)]
    comb = list(itertools.combinations(balls, 2))
    ans = 0
    for c in comb:
        a, b = c
        p = b[0] - a[0]
        q = b[1] - a[1]
        ans_i = 0
        for d in balls:
            e = (d[0] + p, d[1] + q)
            if e in balls:
                ans_i += 1
        ans = max(ans, ans_i)
    print(N - ans)


if __name__ == '__main__':
    main() import sys sys import itertools itertools input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def main():
    N = int(input())
    balls = [tuple(map(int, input().split())) for _ in range(N)]
    comb = list(itertools.combinations(balls, 2))
    ans = 0
    for c in comb:
        a, b = c
        p = b[0] - a[0]
        q = b[1] - a[1]
        ans_i = 0
        for d in balls:
            e = (d[0] + p, d[1] + q)
            if e in balls:
                ans_i += 1
        ans = max(ans, ans_i)
    print(N - ans) main N = int(input()) N int(input()) int input() input tuple(map(int, input().split())) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split balls = [tuple(map(int, input().split())) for _ in range(N)] balls [tuple(map(int, input().split())) for _ in range(N)] comb = list(itertools.combinations(balls, 2)) comb list(itertools.combinations(balls, 2)) list itertools.combinations(balls, 2) itertools.combinations itertools combinations balls 2 ans = 0 ans 0 for c in comb:
        a, b = c
        p = b[0] - a[0]
        q = b[1] - a[1]
        ans_i = 0
        for d in balls:
            e = (d[0] + p, d[1] + q)
            if e in balls:
                ans_i += 1
        ans = max(ans, ans_i)
     c comb a, b = c a c b p = b[0] - a[0] p b[0] - a[0] b[0] b 0 a[0] a 0 q = b[1] - a[1] q b[1] - a[1] b[1] b 1 a[1] a 1 ans_i = 0 ans_i 0 for d in balls:
            e = (d[0] + p, d[1] + q)
            if e in balls:
                ans_i += 1
         d balls e = (d[0] + p, d[1] + q) e (d[0] + p, d[1] + q) d[0] + p d[0] d 0 p d[1] + q d[1] d 1 q if e in balls:
                ans_i += 1
         e in balls e balls ans_i += 1 ans_i 1 ans = max(ans, ans_i) ans max(ans, ans_i) max ans ans_i print(N - ans) print N - ans N ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N = int(input())
    balls = [tuple(map(int, input().split())) for _ in range(N)]
    comb = list(itertools.combinations(balls, 2))
    ans = 0
    for c in comb:
        a, b = c
        p = b[0] - a[0]
        q = b[1] - a[1]
        ans_i = 0
        for d in balls:
            e = (d[0] + p, d[1] + q)
            if e in balls:
                ans_i += 1
        ans = max(ans, ans_i)
    print(N - ans) def main():
    N = int(input())
    balls = [tuple(map(int, input().split())) for _ in range(N)]
    comb = list(itertools.combinations(balls, 2))
    ans = 0
    for c in comb:
        a, b = c
        p = b[0] - a[0]
        q = b[1] - a[1]
        ans_i = 0
        for d in balls:
            e = (d[0] + p, d[1] + q)
            if e in balls:
                ans_i += 1
        ans = max(ans, ans_i)
    print(N - ans) main input = sys.stdin.readline sys.stdin.readline input
import sys
import itertools

input = sys.stdin.readline


def main():
    N = int(input())
    balls = [tuple(map(int, input().split())) for _ in range(N)]
    comb = list(itertools.combinations(balls, 2))
    ans = 0
    for c in comb:
        a, b = c
        p = b[0] - a[0]
        q = b[1] - a[1]
        ans_i = 0
        for d in balls:
            e = (d[0] + p, d[1] + q)
            if e in balls:
                ans_i += 1
        ans = max(ans, ans_i)
    print(N - ans)


if __name__ == '__main__':
    main()
