import sys
import itertools
from collections import defaultdict

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

in_n = lambda: int(readline())
in_nn = lambda: map(int, readline().split())
in_nl = lambda: list(map(int, readline().split()))
in_na = lambda: map(int, read().split())
in_s = lambda: readline().rstrip().decode('utf-8')


def main():
    N = in_n()
    xy = [tuple(in_nn()) for _ in range(N)]

    if N == 1:
        print(1)
        exit()

    comb = itertools.combinations(range(N), 2)
    d = defaultdict(int)

    for i, j in comb:
        x1, y1 = xy[i]
        x2, y2 = xy[j]
        xd = x2 - x1
        yd = y2 - y1
        d[(xd, yd)] += 1
        d[(-xd, -yd)] += 1

    ans = N - max(d.values())
    # print(d)
    print(ans)


if __name__ == '__main__':
    main() import sys sys import itertools itertools from collections import defaultdict read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline in_n = lambda: int(readline()) in_n lambda: int(readline()) int(readline()) int readline() readline in_nn = lambda: map(int, readline().split()) in_nn lambda: map(int, readline().split()) map(int, readline().split()) map int readline().split() ().split () readline split in_nl = lambda: list(map(int, readline().split())) in_nl lambda: list(map(int, readline().split())) list(map(int, readline().split())) list map(int, readline().split()) map int readline().split() ().split () readline split in_na = lambda: map(int, read().split()) in_na lambda: map(int, read().split()) map(int, read().split()) map int read().split() ().split () read split in_s = lambda: readline().rstrip().decode('utf-8') in_s lambda: readline().rstrip().decode('utf-8') readline().rstrip().decode('utf-8') ().rstrip().decode ().rstrip() ().rstrip () readline rstrip decode 'utf-8' def main():
    N = in_n()
    xy = [tuple(in_nn()) for _ in range(N)]

    if N == 1:
        print(1)
        exit()

    comb = itertools.combinations(range(N), 2)
    d = defaultdict(int)

    for i, j in comb:
        x1, y1 = xy[i]
        x2, y2 = xy[j]
        xd = x2 - x1
        yd = y2 - y1
        d[(xd, yd)] += 1
        d[(-xd, -yd)] += 1

    ans = N - max(d.values())
    # print(d)
    print(ans) main N = in_n() N in_n() in_n tuple(in_nn()) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) tuple(in_nn()) tuple in_nn() in_nn xy = [tuple(in_nn()) for _ in range(N)] xy [tuple(in_nn()) for _ in range(N)] if N == 1:
        print(1)
        exit()

     N == 1 N 1 print(1) print 1 exit() exit comb = itertools.combinations(range(N), 2) comb itertools.combinations(range(N), 2) itertools.combinations itertools combinations range(N) range N 2 d = defaultdict(int) d defaultdict(int) defaultdict int for i, j in comb:
        x1, y1 = xy[i]
        x2, y2 = xy[j]
        xd = x2 - x1
        yd = y2 - y1
        d[(xd, yd)] += 1
        d[(-xd, -yd)] += 1

     i j comb x1, y1 = xy[i] x1 xy[i] xy i y1 x2, y2 = xy[j] x2 xy[j] xy j y2 xd = x2 - x1 xd x2 - x1 x2 x1 yd = y2 - y1 yd y2 - y1 y2 y1 d[(xd, yd)] += 1 d[(xd, yd)] d (xd, yd) xd yd 1 d[(-xd, -yd)] += 1 d[(-xd, -yd)] d (-xd, -yd) -xd xd -yd yd 1 ans = N - max(d.values()) ans N - max(d.values()) N max(d.values()) max d.values() d.values d values print(ans) print ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main in_na = lambda: map(int, read().split()) lambda: map(int, read().split()) in_na in_nl = lambda: list(map(int, readline().split())) lambda: list(map(int, readline().split())) in_nl in_s = lambda: readline().rstrip().decode('utf-8') lambda: readline().rstrip().decode('utf-8') in_s def main():
    N = in_n()
    xy = [tuple(in_nn()) for _ in range(N)]

    if N == 1:
        print(1)
        exit()

    comb = itertools.combinations(range(N), 2)
    d = defaultdict(int)

    for i, j in comb:
        x1, y1 = xy[i]
        x2, y2 = xy[j]
        xd = x2 - x1
        yd = y2 - y1
        d[(xd, yd)] += 1
        d[(-xd, -yd)] += 1

    ans = N - max(d.values())
    # print(d)
    print(ans) def main():
    N = in_n()
    xy = [tuple(in_nn()) for _ in range(N)]

    if N == 1:
        print(1)
        exit()

    comb = itertools.combinations(range(N), 2)
    d = defaultdict(int)

    for i, j in comb:
        x1, y1 = xy[i]
        x2, y2 = xy[j]
        xd = x2 - x1
        yd = y2 - y1
        d[(xd, yd)] += 1
        d[(-xd, -yd)] += 1

    ans = N - max(d.values())
    # print(d)
    print(ans) main read = sys.stdin.buffer.read sys.stdin.buffer.read read readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline in_n = lambda: int(readline()) lambda: int(readline()) in_n in_nn = lambda: map(int, readline().split()) lambda: map(int, readline().split()) in_nn
import sys
import itertools
from collections import defaultdict

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

in_n = lambda: int(readline())
in_nn = lambda: map(int, readline().split())
in_nl = lambda: list(map(int, readline().split()))
in_na = lambda: map(int, read().split())
in_s = lambda: readline().rstrip().decode('utf-8')


def main():
    N = in_n()
    xy = [tuple(in_nn()) for _ in range(N)]

    if N == 1:
        print(1)
        exit()

    comb = itertools.combinations(range(N), 2)
    d = defaultdict(int)

    for i, j in comb:
        x1, y1 = xy[i]
        x2, y2 = xy[j]
        xd = x2 - x1
        yd = y2 - y1
        d[(xd, yd)] += 1
        d[(-xd, -yd)] += 1

    ans = N - max(d.values())
    # print(d)
    print(ans)


if __name__ == '__main__':
    main()
