import collections
import itertools

def Z(): return int(input())
def ZZ(): return [int(_) for _ in input().split()]

def main():
    N = Z()
    P = [ZZ() for _ in range(N)]
    vecs = set()
    d = collections.defaultdict(int)
    output = 1
    if N == 1:
        print(output)
        return

    for i, j in itertools.combinations(range(N), 2):
        dx, dy = P[i][0] - P[j][0], P[i][1] - P[j][1]
        if dx < 0: dx, dy = -dx, -dy
        vecs.add((dx, dy))

    c = 0
    for v in list(vecs):
        cc = 0
        for i, j in itertools.combinations(range(N), 2):
            if (P[i][0] - P[j][0] == v[0] and P[i][1] - P[j][1] == v[1]) or (P[i][0] - P[j][0] == -v[0] and P[i][1] - P[j][1] == -v[1]):
                cc += 1
        c = max(c, cc)
    output = (N - c)
    print(output)
    return

if __name__ == '__main__':
    main() import collections collections import itertools itertools def Z(): return int(input()) Z int(_) for _ in input().split() for _ in input().split() _ input().split() ().split () input split for _ in input().split() int(_) int _ def ZZ(): return [int(_) for _ in input().split()] ZZ def main():
    N = Z()
    P = [ZZ() for _ in range(N)]
    vecs = set()
    d = collections.defaultdict(int)
    output = 1
    if N == 1:
        print(output)
        return

    for i, j in itertools.combinations(range(N), 2):
        dx, dy = P[i][0] - P[j][0], P[i][1] - P[j][1]
        if dx < 0: dx, dy = -dx, -dy
        vecs.add((dx, dy))

    c = 0
    for v in list(vecs):
        cc = 0
        for i, j in itertools.combinations(range(N), 2):
            if (P[i][0] - P[j][0] == v[0] and P[i][1] - P[j][1] == v[1]) or (P[i][0] - P[j][0] == -v[0] and P[i][1] - P[j][1] == -v[1]):
                cc += 1
        c = max(c, cc)
    output = (N - c)
    print(output)
    return main N = Z() N Z() Z ZZ() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) ZZ() ZZ P = [ZZ() for _ in range(N)] P [ZZ() for _ in range(N)] vecs = set() vecs set() set d = collections.defaultdict(int) d collections.defaultdict(int) collections.defaultdict collections defaultdict int output = 1 output 1 if N == 1:
        print(output)
        return

     N == 1 N 1 print(output) print output return for i, j in itertools.combinations(range(N), 2):
        dx, dy = P[i][0] - P[j][0], P[i][1] - P[j][1]
        if dx < 0: dx, dy = -dx, -dy
        vecs.add((dx, dy))

     i j itertools.combinations(range(N), 2) itertools.combinations itertools combinations range(N) range N 2 dx, dy = P[i][0] - P[j][0], P[i][1] - P[j][1] dx P[i][0] - P[j][0] P[i][0] [i] P i 0 P[j][0] [j] P j 0 dy P[i][1] - P[j][1] P[i][1] [i] P i 1 P[j][1] [j] P j 1 if dx < 0: dx, dy = -dx, -dy
         dx < 0 dx 0 vecs.add((dx, dy)) vecs.add vecs add (dx, dy) dx dy c = 0 c 0 for v in list(vecs):
        cc = 0
        for i, j in itertools.combinations(range(N), 2):
            if (P[i][0] - P[j][0] == v[0] and P[i][1] - P[j][1] == v[1]) or (P[i][0] - P[j][0] == -v[0] and P[i][1] - P[j][1] == -v[1]):
                cc += 1
        c = max(c, cc)
     v list(vecs) list vecs cc = 0 cc 0 for i, j in itertools.combinations(range(N), 2):
            if (P[i][0] - P[j][0] == v[0] and P[i][1] - P[j][1] == v[1]) or (P[i][0] - P[j][0] == -v[0] and P[i][1] - P[j][1] == -v[1]):
                cc += 1
         i j itertools.combinations(range(N), 2) itertools.combinations itertools combinations range(N) range N 2 if (P[i][0] - P[j][0] == v[0] and P[i][1] - P[j][1] == v[1]) or (P[i][0] - P[j][0] == -v[0] and P[i][1] - P[j][1] == -v[1]):
                cc += 1
         (P[i][0] - P[j][0] == v[0] and P[i][1] - P[j][1] == v[1]) or (P[i][0] - P[j][0] == -v[0] and P[i][1] - P[j][1] == -v[1]) P[i][0] - P[j][0] == v[0] and P[i][1] - P[j][1] == v[1] P[i][0] - P[j][0] == v[0] P[i][0] - P[j][0] P[i][0] [i] P i 0 P[j][0] [j] P j 0 v[0] v 0 P[i][1] - P[j][1] == v[1] P[i][1] - P[j][1] P[i][1] [i] P i 1 P[j][1] [j] P j 1 v[1] v 1 P[i][0] - P[j][0] == -v[0] and P[i][1] - P[j][1] == -v[1] P[i][0] - P[j][0] == -v[0] P[i][0] - P[j][0] P[i][0] [i] P i 0 P[j][0] [j] P j 0 -v[0] v[0] v 0 P[i][1] - P[j][1] == -v[1] P[i][1] - P[j][1] P[i][1] [i] P i 1 P[j][1] [j] P j 1 -v[1] v[1] v 1 cc += 1 cc 1 c = max(c, cc) c max(c, cc) max c cc output = (N - c) output N - c N c print(output) print output return if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N = Z()
    P = [ZZ() for _ in range(N)]
    vecs = set()
    d = collections.defaultdict(int)
    output = 1
    if N == 1:
        print(output)
        return

    for i, j in itertools.combinations(range(N), 2):
        dx, dy = P[i][0] - P[j][0], P[i][1] - P[j][1]
        if dx < 0: dx, dy = -dx, -dy
        vecs.add((dx, dy))

    c = 0
    for v in list(vecs):
        cc = 0
        for i, j in itertools.combinations(range(N), 2):
            if (P[i][0] - P[j][0] == v[0] and P[i][1] - P[j][1] == v[1]) or (P[i][0] - P[j][0] == -v[0] and P[i][1] - P[j][1] == -v[1]):
                cc += 1
        c = max(c, cc)
    output = (N - c)
    print(output)
    return def main():
    N = Z()
    P = [ZZ() for _ in range(N)]
    vecs = set()
    d = collections.defaultdict(int)
    output = 1
    if N == 1:
        print(output)
        return

    for i, j in itertools.combinations(range(N), 2):
        dx, dy = P[i][0] - P[j][0], P[i][1] - P[j][1]
        if dx < 0: dx, dy = -dx, -dy
        vecs.add((dx, dy))

    c = 0
    for v in list(vecs):
        cc = 0
        for i, j in itertools.combinations(range(N), 2):
            if (P[i][0] - P[j][0] == v[0] and P[i][1] - P[j][1] == v[1]) or (P[i][0] - P[j][0] == -v[0] and P[i][1] - P[j][1] == -v[1]):
                cc += 1
        c = max(c, cc)
    output = (N - c)
    print(output)
    return main def ZZ(): return [int(_) for _ in input().split()] def ZZ(): return [int(_) for _ in input().split()] ZZ def Z(): return int(input()) def Z(): return int(input()) Z
import collections
import itertools

def Z(): return int(input())
def ZZ(): return [int(_) for _ in input().split()]

def main():
    N = Z()
    P = [ZZ() for _ in range(N)]
    vecs = set()
    d = collections.defaultdict(int)
    output = 1
    if N == 1:
        print(output)
        return

    for i, j in itertools.combinations(range(N), 2):
        dx, dy = P[i][0] - P[j][0], P[i][1] - P[j][1]
        if dx < 0: dx, dy = -dx, -dy
        vecs.add((dx, dy))

    c = 0
    for v in list(vecs):
        cc = 0
        for i, j in itertools.combinations(range(N), 2):
            if (P[i][0] - P[j][0] == v[0] and P[i][1] - P[j][1] == v[1]) or (P[i][0] - P[j][0] == -v[0] and P[i][1] - P[j][1] == -v[1]):
                cc += 1
        c = max(c, cc)
    output = (N - c)
    print(output)
    return

if __name__ == '__main__':
    main()
