#!/usr/bin python3
# -*- coding: utf-8 -*-

from collections import Counter

def main():
    N = int(input())
    S = [tuple(map(int,input().split())) for _ in range(N)]

    if N == 1:
        print(1)
    else:
        cnt = []
        for i in range(N-1):
            xi, yi = S[i]
            for j in range(i+1,N):
                xj, yj = S[j]
                cnt.append((xi-xj, yi-yj))
                cnt.append((xj-xi, yj-yi))
        A = Counter(cnt)
        ll = max(A.values())
        print(N-ll)

if __name__ == '__main__':
    main() from collections import Counter def main():
    N = int(input())
    S = [tuple(map(int,input().split())) for _ in range(N)]

    if N == 1:
        print(1)
    else:
        cnt = []
        for i in range(N-1):
            xi, yi = S[i]
            for j in range(i+1,N):
                xj, yj = S[j]
                cnt.append((xi-xj, yi-yj))
                cnt.append((xj-xi, yj-yi))
        A = Counter(cnt)
        ll = max(A.values())
        print(N-ll) 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 S = [tuple(map(int,input().split())) for _ in range(N)] S [tuple(map(int,input().split())) for _ in range(N)] if N == 1:
        print(1)
    else:
        cnt = []
        for i in range(N-1):
            xi, yi = S[i]
            for j in range(i+1,N):
                xj, yj = S[j]
                cnt.append((xi-xj, yi-yj))
                cnt.append((xj-xi, yj-yi))
        A = Counter(cnt)
        ll = max(A.values())
        print(N-ll) N == 1 N 1 print(1) print 1 cnt = [] cnt [] for i in range(N-1):
            xi, yi = S[i]
            for j in range(i+1,N):
                xj, yj = S[j]
                cnt.append((xi-xj, yi-yj))
                cnt.append((xj-xi, yj-yi))
         i range(N-1) range N-1 N 1 xi, yi = S[i] xi S[i] S i yi for j in range(i+1,N):
                xj, yj = S[j]
                cnt.append((xi-xj, yi-yj))
                cnt.append((xj-xi, yj-yi))
         j range(i+1,N) range i+1 i 1 N xj, yj = S[j] xj S[j] S j yj cnt.append((xi-xj, yi-yj)) cnt.append cnt append (xi-xj, yi-yj) xi-xj xi xj yi-yj yi yj cnt.append((xj-xi, yj-yi)) cnt.append cnt append (xj-xi, yj-yi) xj-xi xj xi yj-yi yj yi A = Counter(cnt) A Counter(cnt) Counter cnt ll = max(A.values()) ll max(A.values()) max A.values() A.values A values print(N-ll) print N-ll N ll if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N = int(input())
    S = [tuple(map(int,input().split())) for _ in range(N)]

    if N == 1:
        print(1)
    else:
        cnt = []
        for i in range(N-1):
            xi, yi = S[i]
            for j in range(i+1,N):
                xj, yj = S[j]
                cnt.append((xi-xj, yi-yj))
                cnt.append((xj-xi, yj-yi))
        A = Counter(cnt)
        ll = max(A.values())
        print(N-ll) def main():
    N = int(input())
    S = [tuple(map(int,input().split())) for _ in range(N)]

    if N == 1:
        print(1)
    else:
        cnt = []
        for i in range(N-1):
            xi, yi = S[i]
            for j in range(i+1,N):
                xj, yj = S[j]
                cnt.append((xi-xj, yi-yj))
                cnt.append((xj-xi, yj-yi))
        A = Counter(cnt)
        ll = max(A.values())
        print(N-ll) main
#!/usr/bin python3
# -*- coding: utf-8 -*-

from collections import Counter

def main():
    N = int(input())
    S = [tuple(map(int,input().split())) for _ in range(N)]

    if N == 1:
        print(1)
    else:
        cnt = []
        for i in range(N-1):
            xi, yi = S[i]
            for j in range(i+1,N):
                xj, yj = S[j]
                cnt.append((xi-xj, yi-yj))
                cnt.append((xj-xi, yj-yi))
        A = Counter(cnt)
        ll = max(A.values())
        print(N-ll)

if __name__ == '__main__':
    main()