import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

sys.setrecursionlimit(10**7)

ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

from collections import defaultdict

n = ni()
xy = nan(n)

dic = defaultdict(int)
for i in range(n):
    cx, cy = xy[i]
    cx += 10 ** 9
    cy += 10 ** 9
    for j in range(n):
        if i == j:
            continue
        nx, ny = xy[j]
        nx += 10 ** 9
        ny += 10 ** 9
        dic[(nx - cx, ny - cy)] += 1

m = 0
for k, v in dic.items():
    m = max(v, m)

ans = n - m
print(ans) import sys sys stdin = sys.stdin stdin sys.stdin sys stdin inf = 1 << 60 inf 1 << 60 1 60 mod = 1000000007 mod 1000000007 sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 ni = lambda: int(ns()) ni lambda: int(ns()) int(ns()) int ns() ns ni() for _ in range(y) for _ in range(y) _ range(y) range y for _ in range(y) ni() ni nin = lambda y: [ni() for _ in range(y)] nin lambda y: [ni() for _ in range(y)] [ni() for _ in range(y)] y na = lambda: list(map(int, stdin.readline().split())) na lambda: list(map(int, stdin.readline().split())) list(map(int, stdin.readline().split())) list map(int, stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split na() for _ in range(y) for _ in range(y) _ range(y) range y for _ in range(y) na() na nan = lambda y: [na() for _ in range(y)] nan lambda y: [na() for _ in range(y)] [na() for _ in range(y)] y nf = lambda: float(ns()) nf lambda: float(ns()) float(ns()) float ns() ns nf() for _ in range(y) for _ in range(y) _ range(y) range y for _ in range(y) nf() nf nfn = lambda y: [nf() for _ in range(y)] nfn lambda y: [nf() for _ in range(y)] [nf() for _ in range(y)] y nfa = lambda: list(map(float, stdin.readline().split())) nfa lambda: list(map(float, stdin.readline().split())) list(map(float, stdin.readline().split())) list map(float, stdin.readline().split()) map float stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split nfa() for _ in range(y) for _ in range(y) _ range(y) range y for _ in range(y) nfa() nfa nfan = lambda y: [nfa() for _ in range(y)] nfan lambda y: [nfa() for _ in range(y)] [nfa() for _ in range(y)] y ns = lambda: stdin.readline().rstrip() ns lambda: stdin.readline().rstrip() stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip ns() for _ in range(y) for _ in range(y) _ range(y) range y for _ in range(y) ns() ns nsn = lambda y: [ns() for _ in range(y)] nsn lambda y: [ns() for _ in range(y)] [ns() for _ in range(y)] y list(ns()) for _ in range(y) for _ in range(y) _ range(y) range y for _ in range(y) list(ns()) list ns() ns ncl = lambda y: [list(ns()) for _ in range(y)] ncl lambda y: [list(ns()) for _ in range(y)] [list(ns()) for _ in range(y)] y nas = lambda: stdin.readline().split() nas lambda: stdin.readline().split() stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split from collections import defaultdict n = ni() n ni() ni xy = nan(n) xy nan(n) nan n dic = defaultdict(int) dic defaultdict(int) defaultdict int for i in range(n):
    cx, cy = xy[i]
    cx += 10 ** 9
    cy += 10 ** 9
    for j in range(n):
        if i == j:
            continue
        nx, ny = xy[j]
        nx += 10 ** 9
        ny += 10 ** 9
        dic[(nx - cx, ny - cy)] += 1 i range(n) range n cx, cy = xy[i] cx xy[i] xy i cy cx += 10 ** 9 cx 10 ** 9 10 9 cy += 10 ** 9 cy 10 ** 9 10 9 for j in range(n):
        if i == j:
            continue
        nx, ny = xy[j]
        nx += 10 ** 9
        ny += 10 ** 9
        dic[(nx - cx, ny - cy)] += 1 j range(n) range n if i == j:
            continue
         i == j i j continue nx, ny = xy[j] nx xy[j] xy j ny nx += 10 ** 9 nx 10 ** 9 10 9 ny += 10 ** 9 ny 10 ** 9 10 9 dic[(nx - cx, ny - cy)] += 1 dic[(nx - cx, ny - cy)] dic (nx - cx, ny - cy) nx - cx nx cx ny - cy ny cy 1 m = 0 m 0 for k, v in dic.items():
    m = max(v, m) k v dic.items() dic.items dic items m = max(v, m) m max(v, m) max v m ans = n - m ans n - m n m print(ans) print ans cx += 10 ** 9 10 ** 9 cx ans = n - m n - m ans stdin = sys.stdin sys.stdin stdin xy = nan(n) nan(n) xy nx += 10 ** 9 10 ** 9 nx m = 0 0 m ncl = lambda y: [list(ns()) for _ in range(y)] lambda y: [list(ns()) for _ in range(y)] ncl inf = 1 << 60 1 << 60 inf m = max(v, m) max(v, m) m nf = lambda: float(ns()) lambda: float(ns()) nf cx, cy = xy[i] xy[i] cx cy = xy[i] xy[i] cy nin = lambda y: [ni() for _ in range(y)] lambda y: [ni() for _ in range(y)] nin nsn = lambda y: [ns() for _ in range(y)] lambda y: [ns() for _ in range(y)] nsn nan = lambda y: [na() for _ in range(y)] lambda y: [na() for _ in range(y)] nan ns = lambda: stdin.readline().rstrip() lambda: stdin.readline().rstrip() ns n = ni() ni() n dic = defaultdict(int) defaultdict(int) dic ny += 10 ** 9 10 ** 9 ny na = lambda: list(map(int, stdin.readline().split())) lambda: list(map(int, stdin.readline().split())) na nx, ny = xy[j] xy[j] nx nfa = lambda: list(map(float, stdin.readline().split())) lambda: list(map(float, stdin.readline().split())) nfa nas = lambda: stdin.readline().split() lambda: stdin.readline().split() nas mod = 1000000007 1000000007 mod ny = xy[j] xy[j] ny nfan = lambda y: [nfa() for _ in range(y)] lambda y: [nfa() for _ in range(y)] nfan cy += 10 ** 9 10 ** 9 cy ni = lambda: int(ns()) lambda: int(ns()) ni nfn = lambda y: [nf() for _ in range(y)] lambda y: [nf() for _ in range(y)] nfn
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

sys.setrecursionlimit(10**7)

ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

from collections import defaultdict

n = ni()
xy = nan(n)

dic = defaultdict(int)
for i in range(n):
    cx, cy = xy[i]
    cx += 10 ** 9
    cy += 10 ** 9
    for j in range(n):
        if i == j:
            continue
        nx, ny = xy[j]
        nx += 10 ** 9
        ny += 10 ** 9
        dic[(nx - cx, ny - cy)] += 1

m = 0
for k, v in dic.items():
    m = max(v, m)

ans = n - m
print(ans)