import sys
sys.setrecursionlimit(10 ** 9)
# input = sys.stdin.readline    ####
def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')
# from math import ceil, floor, log2
from collections import deque, defaultdict
# from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations
# from heapq import heapify, heappop, heappush
# import numpy as np    # cumsum
# from bisect import bisect_left, bisect_right

def solve():
    N = II()
    X = [0] * N
    Y = [0] * N
    for i in range(N):
        x, y = MI()
        X[i], Y[i] = x, y

    dct = defaultdict(int)
    for i in range(N):
        for j in range(N):
            if i == j: continue
            xi, yi = X[i], Y[i]
            xj, yj = X[j], Y[j]

            dct[(xi-xj, yi-yj)] += 1
    # print(dct)
    mx = 0
    for d in dct.values():
        mx = max(mx, d)
    print(N - mx)


if __name__ == '__main__':
    solve()
 import sys sys sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 def int1(x): return int(x) - 1 int1 x x def II(): return int(input()) II def MI(): return map(int, input().split()) MI def MI1(): return map(int1, input().split()) MI1 def LI(): return list(map(int, input().split())) LI def LI1(): return list(map(int1, input().split())) LI1 LI() for _ in range(rows_number) for _ in range(rows_number) _ range(rows_number) range rows_number for _ in range(rows_number) LI() LI def LLI(rows_number): return [LI() for _ in range(rows_number)] LLI rows_number rows_number def MS(): return input().split() MS def LS(): return list(input()) LS LS() for _ in range(rows_number) for _ in range(rows_number) _ range(rows_number) range rows_number for _ in range(rows_number) LS() LS def LLS(rows_number): return [LS() for _ in range(rows_number)] LLS rows_number rows_number def printlist(lst, k=' '): print(k.join(list(map(str, lst)))) printlist lst lst k=' ' k ' ' INF = float('inf') INF float('inf') float 'inf' from collections import deque, defaultdict def solve():
    N = II()
    X = [0] * N
    Y = [0] * N
    for i in range(N):
        x, y = MI()
        X[i], Y[i] = x, y

    dct = defaultdict(int)
    for i in range(N):
        for j in range(N):
            if i == j: continue
            xi, yi = X[i], Y[i]
            xj, yj = X[j], Y[j]

            dct[(xi-xj, yi-yj)] += 1
    # print(dct)
    mx = 0
    for d in dct.values():
        mx = max(mx, d)
    print(N - mx) solve N = II() N II() II X = [0] * N X [0] * N [0] 0 N Y = [0] * N Y [0] * N [0] 0 N for i in range(N):
        x, y = MI()
        X[i], Y[i] = x, y

     i range(N) range N x, y = MI() x MI() MI y X[i], Y[i] = x, y X[i] X i x Y[i] Y i y dct = defaultdict(int) dct defaultdict(int) defaultdict int for i in range(N):
        for j in range(N):
            if i == j: continue
            xi, yi = X[i], Y[i]
            xj, yj = X[j], Y[j]

            dct[(xi-xj, yi-yj)] += 1
    # print(dct)
     i range(N) range N for j in range(N):
            if i == j: continue
            xi, yi = X[i], Y[i]
            xj, yj = X[j], Y[j]

            dct[(xi-xj, yi-yj)] += 1
    # print(dct)
     j range(N) range N if i == j: continue
             i == j i j xi, yi = X[i], Y[i] xi X[i] X i yi Y[i] Y i xj, yj = X[j], Y[j] xj X[j] X j yj Y[j] Y j dct[(xi-xj, yi-yj)] += 1 dct[(xi-xj, yi-yj)] dct (xi-xj, yi-yj) xi-xj xi xj yi-yj yi yj 1 mx = 0 mx 0 for d in dct.values():
        mx = max(mx, d)
     d dct.values() dct.values dct values mx = max(mx, d) mx max(mx, d) max mx d print(N - mx) print N - mx N mx if __name__ == '__main__':
    solve() __name__ == '__main__' __name__ '__main__' solve() solve def MI1(): return map(int1, input().split()) def MI1(): return map(int1, input().split()) MI1 def LS(): return list(input()) def LS(): return list(input()) LS def LLI(rows_number): return [LI() for _ in range(rows_number)] def LLI(rows_number): return [LI() for _ in range(rows_number)] LLI def MI(): return map(int, input().split()) def MI(): return map(int, input().split()) MI def LI1(): return list(map(int1, input().split())) def LI1(): return list(map(int1, input().split())) LI1 def LLS(rows_number): return [LS() for _ in range(rows_number)] def LLS(rows_number): return [LS() for _ in range(rows_number)] LLS def int1(x): return int(x) - 1 def int1(x): return int(x) - 1 int1 INF = float('inf') float('inf') INF def LI(): return list(map(int, input().split())) def LI(): return list(map(int, input().split())) LI def solve():
    N = II()
    X = [0] * N
    Y = [0] * N
    for i in range(N):
        x, y = MI()
        X[i], Y[i] = x, y

    dct = defaultdict(int)
    for i in range(N):
        for j in range(N):
            if i == j: continue
            xi, yi = X[i], Y[i]
            xj, yj = X[j], Y[j]

            dct[(xi-xj, yi-yj)] += 1
    # print(dct)
    mx = 0
    for d in dct.values():
        mx = max(mx, d)
    print(N - mx) def solve():
    N = II()
    X = [0] * N
    Y = [0] * N
    for i in range(N):
        x, y = MI()
        X[i], Y[i] = x, y

    dct = defaultdict(int)
    for i in range(N):
        for j in range(N):
            if i == j: continue
            xi, yi = X[i], Y[i]
            xj, yj = X[j], Y[j]

            dct[(xi-xj, yi-yj)] += 1
    # print(dct)
    mx = 0
    for d in dct.values():
        mx = max(mx, d)
    print(N - mx) solve def MS(): return input().split() def MS(): return input().split() MS def printlist(lst, k=' '): print(k.join(list(map(str, lst)))) def printlist(lst, k=' '): print(k.join(list(map(str, lst)))) printlist def II(): return int(input()) def II(): return int(input()) II
import sys
sys.setrecursionlimit(10 ** 9)
# input = sys.stdin.readline    ####
def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')
# from math import ceil, floor, log2
from collections import deque, defaultdict
# from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations
# from heapq import heapify, heappop, heappush
# import numpy as np    # cumsum
# from bisect import bisect_left, bisect_right

def solve():
    N = II()
    X = [0] * N
    Y = [0] * N
    for i in range(N):
        x, y = MI()
        X[i], Y[i] = x, y

    dct = defaultdict(int)
    for i in range(N):
        for j in range(N):
            if i == j: continue
            xi, yi = X[i], Y[i]
            xj, yj = X[j], Y[j]

            dct[(xi-xj, yi-yj)] += 1
    # print(dct)
    mx = 0
    for d in dct.values():
        mx = max(mx, d)
    print(N - mx)


if __name__ == '__main__':
    solve()

