from collections import Counter
n = int(input())
if n == 1:
  print(1)
else:
  XY = tuple(tuple(map(int, input().split())) for _ in range(n))
  L = []
  for i in range(n-1):
    for j in range(i+1, n):
      x1, y1 = XY[i]
      x2, y2 = XY[j]
      L.append((x1-x2, y1-y2))
      L.append((x2-x1, y2-y1))
  C = Counter(L)
  ans = n - C.most_common()[0][1]
  print(ans) from collections import Counter n = int(input()) n int(input()) int input() input if n == 1:
  print(1)
else:
  XY = tuple(tuple(map(int, input().split())) for _ in range(n))
  L = []
  for i in range(n-1):
    for j in range(i+1, n):
      x1, y1 = XY[i]
      x2, y2 = XY[j]
      L.append((x1-x2, y1-y2))
      L.append((x2-x1, y2-y1))
  C = Counter(L)
  ans = n - C.most_common()[0][1]
  print(ans) n == 1 n 1 print(1) print 1 XY = tuple(tuple(map(int, input().split())) for _ in range(n)) XY tuple(tuple(map(int, input().split())) for _ in range(n)) tuple tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split L = [] L [] for i in range(n-1):
    for j in range(i+1, n):
      x1, y1 = XY[i]
      x2, y2 = XY[j]
      L.append((x1-x2, y1-y2))
      L.append((x2-x1, y2-y1))
   i range(n-1) range n-1 n 1 for j in range(i+1, n):
      x1, y1 = XY[i]
      x2, y2 = XY[j]
      L.append((x1-x2, y1-y2))
      L.append((x2-x1, y2-y1))
   j range(i+1, n) range i+1 i 1 n x1, y1 = XY[i] x1 XY[i] XY i y1 x2, y2 = XY[j] x2 XY[j] XY j y2 L.append((x1-x2, y1-y2)) L.append L append (x1-x2, y1-y2) x1-x2 x1 x2 y1-y2 y1 y2 L.append((x2-x1, y2-y1)) L.append L append (x2-x1, y2-y1) x2-x1 x2 x1 y2-y1 y2 y1 C = Counter(L) C Counter(L) Counter L ans = n - C.most_common()[0][1] ans n - C.most_common()[0][1] n C.most_common()[0][1] [0] C.most_common() C.most_common C most_common 0 1 print(ans) print ans n = int(input()) int(input()) n x2, y2 = XY[j] XY[j] x2 y2 = XY[j] XY[j] y2 x1, y1 = XY[i] XY[i] x1 y1 = XY[i] XY[i] y1 ans = n - C.most_common()[0][1] n - C.most_common()[0][1] ans L = [] [] L C = Counter(L) Counter(L) C XY = tuple(tuple(map(int, input().split())) for _ in range(n)) tuple(tuple(map(int, input().split())) for _ in range(n)) XY
from collections import Counter
n = int(input())
if n == 1:
  print(1)
else:
  XY = tuple(tuple(map(int, input().split())) for _ in range(n))
  L = []
  for i in range(n-1):
    for j in range(i+1, n):
      x1, y1 = XY[i]
      x2, y2 = XY[j]
      L.append((x1-x2, y1-y2))
      L.append((x2-x1, y2-y1))
  C = Counter(L)
  ans = n - C.most_common()[0][1]
  print(ans)