import itertools
from collections import defaultdict


def main():
    N = int(input())
    if N == 1:
        print(1)

    else:
        XY = [list(map(int, input().split())) for _ in range(N)]

        dd = defaultdict(int)

        for xy1, xy2 in itertools.combinations(XY, 2):
            a = (xy2[0] - xy1[0], xy2[1] - xy1[1])
            b = (-a[0], -a[1])
            dd[a] += 1
            dd[b] += 1

        print(N - max(dd.values()))


main() import itertools itertools from collections import defaultdict def main():
    N = int(input())
    if N == 1:
        print(1)

    else:
        XY = [list(map(int, input().split())) for _ in range(N)]

        dd = defaultdict(int)

        for xy1, xy2 in itertools.combinations(XY, 2):
            a = (xy2[0] - xy1[0], xy2[1] - xy1[1])
            b = (-a[0], -a[1])
            dd[a] += 1
            dd[b] += 1

        print(N - max(dd.values())) main N = int(input()) N int(input()) int input() input if N == 1:
        print(1)

    else:
        XY = [list(map(int, input().split())) for _ in range(N)]

        dd = defaultdict(int)

        for xy1, xy2 in itertools.combinations(XY, 2):
            a = (xy2[0] - xy1[0], xy2[1] - xy1[1])
            b = (-a[0], -a[1])
            dd[a] += 1
            dd[b] += 1

        print(N - max(dd.values())) N == 1 N 1 print(1) print 1 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 XY = [list(map(int, input().split())) for _ in range(N)] XY [list(map(int, input().split())) for _ in range(N)] dd = defaultdict(int) dd defaultdict(int) defaultdict int for xy1, xy2 in itertools.combinations(XY, 2):
            a = (xy2[0] - xy1[0], xy2[1] - xy1[1])
            b = (-a[0], -a[1])
            dd[a] += 1
            dd[b] += 1

         xy1 xy2 itertools.combinations(XY, 2) itertools.combinations itertools combinations XY 2 a = (xy2[0] - xy1[0], xy2[1] - xy1[1]) a (xy2[0] - xy1[0], xy2[1] - xy1[1]) xy2[0] - xy1[0] xy2[0] xy2 0 xy1[0] xy1 0 xy2[1] - xy1[1] xy2[1] xy2 1 xy1[1] xy1 1 b = (-a[0], -a[1]) b (-a[0], -a[1]) -a[0] a[0] a 0 -a[1] a[1] a 1 dd[a] += 1 dd[a] dd a 1 dd[b] += 1 dd[b] dd b 1 print(N - max(dd.values())) print N - max(dd.values()) N max(dd.values()) max dd.values() dd.values dd values main() main def main():
    N = int(input())
    if N == 1:
        print(1)

    else:
        XY = [list(map(int, input().split())) for _ in range(N)]

        dd = defaultdict(int)

        for xy1, xy2 in itertools.combinations(XY, 2):
            a = (xy2[0] - xy1[0], xy2[1] - xy1[1])
            b = (-a[0], -a[1])
            dd[a] += 1
            dd[b] += 1

        print(N - max(dd.values())) def main():
    N = int(input())
    if N == 1:
        print(1)

    else:
        XY = [list(map(int, input().split())) for _ in range(N)]

        dd = defaultdict(int)

        for xy1, xy2 in itertools.combinations(XY, 2):
            a = (xy2[0] - xy1[0], xy2[1] - xy1[1])
            b = (-a[0], -a[1])
            dd[a] += 1
            dd[b] += 1

        print(N - max(dd.values())) main
import itertools
from collections import defaultdict


def main():
    N = int(input())
    if N == 1:
        print(1)

    else:
        XY = [list(map(int, input().split())) for _ in range(N)]

        dd = defaultdict(int)

        for xy1, xy2 in itertools.combinations(XY, 2):
            a = (xy2[0] - xy1[0], xy2[1] - xy1[1])
            b = (-a[0], -a[1])
            dd[a] += 1
            dd[b] += 1

        print(N - max(dd.values()))


main()
