import sys

# import re
import math
import collections
# import decimal
import bisect
# import itertools
import fractions
# import functools
import copy
import heapq
import decimal
# import statistics
import queue

sys.setrecursionlimit(10000001)
INF = 10 ** 16
MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===


def main():
    n = ni()
    pos = []
    for i in range(n):
        x, y = ns()
        pos.append((x, y))

    res = dict()
    for i in range(n):
        for j in range(n):
            if i == j: continue
            tmp_key = (pos[j][0] - pos[i][0], pos[j][1] - pos[i][1])
            if tmp_key in res.keys():
                res[tmp_key].append((pos[i], pos[j]))
            else:
                res[tmp_key] = [(pos[i], pos[j])]

    ans = 0
    for k in res.keys():
        ans = max(ans, len(res[k]))

    print(n-ans)


if __name__ == '__main__':
    main() import sys sys import math math import collections collections import bisect bisect import fractions fractions import copy copy import heapq heapq import decimal decimal import queue queue sys.setrecursionlimit(10000001) sys.setrecursionlimit sys setrecursionlimit 10000001 INF = 10 ** 16 INF 10 ** 16 10 16 MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 ni = lambda: int(sys.stdin.readline()) ni lambda: int(sys.stdin.readline()) int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline ns = lambda: map(int, sys.stdin.readline().split()) ns lambda: map(int, sys.stdin.readline().split()) map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split na = lambda: list(map(int, sys.stdin.readline().split())) na lambda: list(map(int, sys.stdin.readline().split())) list(map(int, sys.stdin.readline().split())) list map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split def main():
    n = ni()
    pos = []
    for i in range(n):
        x, y = ns()
        pos.append((x, y))

    res = dict()
    for i in range(n):
        for j in range(n):
            if i == j: continue
            tmp_key = (pos[j][0] - pos[i][0], pos[j][1] - pos[i][1])
            if tmp_key in res.keys():
                res[tmp_key].append((pos[i], pos[j]))
            else:
                res[tmp_key] = [(pos[i], pos[j])]

    ans = 0
    for k in res.keys():
        ans = max(ans, len(res[k]))

    print(n-ans) main n = ni() n ni() ni pos = [] pos [] for i in range(n):
        x, y = ns()
        pos.append((x, y))

     i range(n) range n x, y = ns() x ns() ns y pos.append((x, y)) pos.append pos append (x, y) x y res = dict() res dict() dict for i in range(n):
        for j in range(n):
            if i == j: continue
            tmp_key = (pos[j][0] - pos[i][0], pos[j][1] - pos[i][1])
            if tmp_key in res.keys():
                res[tmp_key].append((pos[i], pos[j]))
            else:
                res[tmp_key] = [(pos[i], pos[j])]

     i range(n) range n for j in range(n):
            if i == j: continue
            tmp_key = (pos[j][0] - pos[i][0], pos[j][1] - pos[i][1])
            if tmp_key in res.keys():
                res[tmp_key].append((pos[i], pos[j]))
            else:
                res[tmp_key] = [(pos[i], pos[j])]

     j range(n) range n if i == j: continue
             i == j i j tmp_key = (pos[j][0] - pos[i][0], pos[j][1] - pos[i][1]) tmp_key (pos[j][0] - pos[i][0], pos[j][1] - pos[i][1]) pos[j][0] - pos[i][0] pos[j][0] [j] pos j 0 pos[i][0] [i] pos i 0 pos[j][1] - pos[i][1] pos[j][1] [j] pos j 1 pos[i][1] [i] pos i 1 if tmp_key in res.keys():
                res[tmp_key].append((pos[i], pos[j]))
            else:
                res[tmp_key] = [(pos[i], pos[j])]

     tmp_key in res.keys() tmp_key res.keys() res.keys res keys res[tmp_key].append((pos[i], pos[j])) [tmp_key].append [tmp_key] res tmp_key append (pos[i], pos[j]) pos[i] pos i pos[j] pos j res[tmp_key] = [(pos[i], pos[j])] res[tmp_key] res tmp_key [(pos[i], pos[j])] (pos[i], pos[j]) pos[i] pos i pos[j] pos j ans = 0 ans 0 for k in res.keys():
        ans = max(ans, len(res[k]))

     k res.keys() res.keys res keys ans = max(ans, len(res[k])) ans max(ans, len(res[k])) max ans len(res[k]) len res[k] res k print(n-ans) print n-ans n ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main ns = lambda: map(int, sys.stdin.readline().split()) lambda: map(int, sys.stdin.readline().split()) ns INF = 10 ** 16 10 ** 16 INF def main():
    n = ni()
    pos = []
    for i in range(n):
        x, y = ns()
        pos.append((x, y))

    res = dict()
    for i in range(n):
        for j in range(n):
            if i == j: continue
            tmp_key = (pos[j][0] - pos[i][0], pos[j][1] - pos[i][1])
            if tmp_key in res.keys():
                res[tmp_key].append((pos[i], pos[j]))
            else:
                res[tmp_key] = [(pos[i], pos[j])]

    ans = 0
    for k in res.keys():
        ans = max(ans, len(res[k]))

    print(n-ans) def main():
    n = ni()
    pos = []
    for i in range(n):
        x, y = ns()
        pos.append((x, y))

    res = dict()
    for i in range(n):
        for j in range(n):
            if i == j: continue
            tmp_key = (pos[j][0] - pos[i][0], pos[j][1] - pos[i][1])
            if tmp_key in res.keys():
                res[tmp_key].append((pos[i], pos[j]))
            else:
                res[tmp_key] = [(pos[i], pos[j])]

    ans = 0
    for k in res.keys():
        ans = max(ans, len(res[k]))

    print(n-ans) main na = lambda: list(map(int, sys.stdin.readline().split())) lambda: list(map(int, sys.stdin.readline().split())) na MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD ni = lambda: int(sys.stdin.readline()) lambda: int(sys.stdin.readline()) ni
import sys

# import re
import math
import collections
# import decimal
import bisect
# import itertools
import fractions
# import functools
import copy
import heapq
import decimal
# import statistics
import queue

sys.setrecursionlimit(10000001)
INF = 10 ** 16
MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===


def main():
    n = ni()
    pos = []
    for i in range(n):
        x, y = ns()
        pos.append((x, y))

    res = dict()
    for i in range(n):
        for j in range(n):
            if i == j: continue
            tmp_key = (pos[j][0] - pos[i][0], pos[j][1] - pos[i][1])
            if tmp_key in res.keys():
                res[tmp_key].append((pos[i], pos[j]))
            else:
                res[tmp_key] = [(pos[i], pos[j])]

    ans = 0
    for k in res.keys():
        ans = max(ans, len(res[k]))

    print(n-ans)


if __name__ == '__main__':
    main()
