from collections import defaultdict

def diverta192_b():
    N = int(input())
    P = [tuple(map(int, input().split())) for _ in range(N)]
    if len(P) == 1:
        print(1)  # 座標が1つだけ与えられる場合は即終了
        return

    dcnt = defaultdict(int)  # import忘れずに
    for i in range(N):
        xi, yi = P[i]
        for j in range(i):
            xj, yj = P[j]
            dcnt[(xi-xj, yi-yj)] += 1
            dcnt[(xj-xi, yj-yi)] += 1  # 逆向きもカウントする(都合よいほうを使う)
    most = sorted(dcnt.values(), reverse=True)[0]  # 最も多いカウントを取り出す
    ans = N - most
    print(ans)

diverta192_b() from collections import defaultdict def diverta192_b():
    N = int(input())
    P = [tuple(map(int, input().split())) for _ in range(N)]
    if len(P) == 1:
        print(1)  # 座標が1つだけ与えられる場合は即終了
        return

    dcnt = defaultdict(int)  # import忘れずに
    for i in range(N):
        xi, yi = P[i]
        for j in range(i):
            xj, yj = P[j]
            dcnt[(xi-xj, yi-yj)] += 1
            dcnt[(xj-xi, yj-yi)] += 1  # 逆向きもカウントする(都合よいほうを使う)
    most = sorted(dcnt.values(), reverse=True)[0]  # 最も多いカウントを取り出す
    ans = N - most
    print(ans) diverta192_b 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 P = [tuple(map(int, input().split())) for _ in range(N)] P [tuple(map(int, input().split())) for _ in range(N)] if len(P) == 1:
        print(1)  # 座標が1つだけ与えられる場合は即終了
        return

     len(P) == 1 len(P) len P 1 print(1) print 1 return dcnt = defaultdict(int) dcnt defaultdict(int) defaultdict int for i in range(N):
        xi, yi = P[i]
        for j in range(i):
            xj, yj = P[j]
            dcnt[(xi-xj, yi-yj)] += 1
            dcnt[(xj-xi, yj-yi)] += 1  # 逆向きもカウントする(都合よいほうを使う)
     i range(N) range N xi, yi = P[i] xi P[i] P i yi for j in range(i):
            xj, yj = P[j]
            dcnt[(xi-xj, yi-yj)] += 1
            dcnt[(xj-xi, yj-yi)] += 1  # 逆向きもカウントする(都合よいほうを使う)
     j range(i) range i xj, yj = P[j] xj P[j] P j yj dcnt[(xi-xj, yi-yj)] += 1 dcnt[(xi-xj, yi-yj)] dcnt (xi-xj, yi-yj) xi-xj xi xj yi-yj yi yj 1 dcnt[(xj-xi, yj-yi)] += 1 dcnt[(xj-xi, yj-yi)] dcnt (xj-xi, yj-yi) xj-xi xj xi yj-yi yj yi 1 most = sorted(dcnt.values(), reverse=True)[0] most sorted(dcnt.values(), reverse=True)[0] (dcnt.values(), reverse=True) sorted dcnt.values() dcnt.values dcnt values reverse=True reverse True 0 ans = N - most ans N - most N most print(ans) print ans diverta192_b() diverta192_b def diverta192_b():
    N = int(input())
    P = [tuple(map(int, input().split())) for _ in range(N)]
    if len(P) == 1:
        print(1)  # 座標が1つだけ与えられる場合は即終了
        return

    dcnt = defaultdict(int)  # import忘れずに
    for i in range(N):
        xi, yi = P[i]
        for j in range(i):
            xj, yj = P[j]
            dcnt[(xi-xj, yi-yj)] += 1
            dcnt[(xj-xi, yj-yi)] += 1  # 逆向きもカウントする(都合よいほうを使う)
    most = sorted(dcnt.values(), reverse=True)[0]  # 最も多いカウントを取り出す
    ans = N - most
    print(ans) def diverta192_b():
    N = int(input())
    P = [tuple(map(int, input().split())) for _ in range(N)]
    if len(P) == 1:
        print(1)  # 座標が1つだけ与えられる場合は即終了
        return

    dcnt = defaultdict(int)  # import忘れずに
    for i in range(N):
        xi, yi = P[i]
        for j in range(i):
            xj, yj = P[j]
            dcnt[(xi-xj, yi-yj)] += 1
            dcnt[(xj-xi, yj-yi)] += 1  # 逆向きもカウントする(都合よいほうを使う)
    most = sorted(dcnt.values(), reverse=True)[0]  # 最も多いカウントを取り出す
    ans = N - most
    print(ans) diverta192_b
from collections import defaultdict

def diverta192_b():
    N = int(input())
    P = [tuple(map(int, input().split())) for _ in range(N)]
    if len(P) == 1:
        print(1)  # 座標が1つだけ与えられる場合は即終了
        return

    dcnt = defaultdict(int)  # import忘れずに
    for i in range(N):
        xi, yi = P[i]
        for j in range(i):
            xj, yj = P[j]
            dcnt[(xi-xj, yi-yj)] += 1
            dcnt[(xj-xi, yj-yi)] += 1  # 逆向きもカウントする(都合よいほうを使う)
    most = sorted(dcnt.values(), reverse=True)[0]  # 最も多いカウントを取り出す
    ans = N - most
    print(ans)

diverta192_b()