from itertools import combinations
n = int(input())
if n == 1:
  print(1)
  exit(0)
pos = []
for i in range(n):
  pos.append(tuple(map(int,input().split())))
ans = 1e100
def cost(p,q):
  ret = 0
  for i,j in pos:
    ret += 1 - ((i+p,j+q) in pos)
  return ret
for a,b in combinations(pos, 2):
  ans = min(ans, cost(a[0]-b[0],a[1]-b[1]))
print(ans) from itertools import combinations n = int(input()) n int(input()) int input() input if n == 1:
  print(1)
  exit(0) n == 1 n 1 print(1) print 1 exit(0) exit 0 pos = [] pos [] for i in range(n):
  pos.append(tuple(map(int,input().split()))) i range(n) range n pos.append(tuple(map(int,input().split()))) pos.append pos append tuple(map(int,input().split())) tuple map(int,input().split()) map int input().split() ().split () input split ans = 1e100 ans 1e100 def cost(p,q):
  ret = 0
  for i,j in pos:
    ret += 1 - ((i+p,j+q) in pos)
  return ret cost ret = 0 ret 0 for i,j in pos:
    ret += 1 - ((i+p,j+q) in pos)
   i j pos ret += 1 - ((i+p,j+q) in pos) ret 1 - ((i+p,j+q) in pos) 1 (i+p,j+q) in pos (i+p,j+q) i+p i p j+q j q pos return ret ret p p q q for a,b in combinations(pos, 2):
  ans = min(ans, cost(a[0]-b[0],a[1]-b[1])) a b combinations(pos, 2) combinations pos 2 ans = min(ans, cost(a[0]-b[0],a[1]-b[1])) ans min(ans, cost(a[0]-b[0],a[1]-b[1])) min ans cost(a[0]-b[0],a[1]-b[1]) cost a[0]-b[0] a[0] a 0 b[0] b 0 a[1]-b[1] a[1] a 1 b[1] b 1 print(ans) print ans ans = 1e100 1e100 ans pos = [] [] pos def cost(p,q):
  ret = 0
  for i,j in pos:
    ret += 1 - ((i+p,j+q) in pos)
  return ret def cost(p,q):
  ret = 0
  for i,j in pos:
    ret += 1 - ((i+p,j+q) in pos)
  return ret cost ans = min(ans, cost(a[0]-b[0],a[1]-b[1])) min(ans, cost(a[0]-b[0],a[1]-b[1])) ans n = int(input()) int(input()) n
from itertools import combinations
n = int(input())
if n == 1:
  print(1)
  exit(0)
pos = []
for i in range(n):
  pos.append(tuple(map(int,input().split())))
ans = 1e100
def cost(p,q):
  ret = 0
  for i,j in pos:
    ret += 1 - ((i+p,j+q) in pos)
  return ret
for a,b in combinations(pos, 2):
  ans = min(ans, cost(a[0]-b[0],a[1]-b[1]))
print(ans)
