import sys
input = sys.stdin.readline

N = int(input())
b = [list(map(int, input().split())) for _ in range(N)]
b.sort(key = lambda x: (x[0], x[1]))
vis = set()
viss = set()
res = 0
def dfs(n, p, q):
  global vis
  global viss
  res = 0
  vis.add(n)
  viss.add(n)
  for k in range(N):
    if k in vis: continue
    if k in viss: continue
    if (b[k][0] == b[n][0] + p) and (b[k][1] == b[n][1] + q):
      res = max(res, dfs(k, p, q))
  vis.discard(n)
  return res + 1
for i in range(N):
  for j in range(N):
    vis = set()
    viss = set()
    p = b[j][0] - b[i][0]
    q = b[j][1] - b[i][1]
    temp = 0
    for n in range(N):
      if n in viss: continue
      t = dfs(n, p, q)
      if t > 1:
        temp += t - 1
    res = max(temp, res)
    #print(temp, p, q)
print(N - res) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline N = int(input()) N int(input()) int input() input list(map(int, input().split())) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split b = [list(map(int, input().split())) for _ in range(N)] b [list(map(int, input().split())) for _ in range(N)] b.sort(key = lambda x: (x[0], x[1])) b.sort b sort key = lambda x: (x[0], x[1]) key lambda x: (x[0], x[1]) (x[0], x[1]) x[0] x 0 x[1] x 1 x vis = set() vis set() set viss = set() viss set() set res = 0 res 0 def dfs(n, p, q):
  global vis
  global viss
  res = 0
  vis.add(n)
  viss.add(n)
  for k in range(N):
    if k in vis: continue
    if k in viss: continue
    if (b[k][0] == b[n][0] + p) and (b[k][1] == b[n][1] + q):
      res = max(res, dfs(k, p, q))
  vis.discard(n)
  return res + 1 dfs global vis global viss res = 0 res 0 vis.add(n) vis.add vis add n viss.add(n) viss.add viss add n for k in range(N):
    if k in vis: continue
    if k in viss: continue
    if (b[k][0] == b[n][0] + p) and (b[k][1] == b[n][1] + q):
      res = max(res, dfs(k, p, q))
   k range(N) range N if k in vis: continue
     k in vis k vis if k in viss: continue
     k in viss k viss if (b[k][0] == b[n][0] + p) and (b[k][1] == b[n][1] + q):
      res = max(res, dfs(k, p, q))
   (b[k][0] == b[n][0] + p) and (b[k][1] == b[n][1] + q) b[k][0] == b[n][0] + p b[k][0] [k] b k 0 b[n][0] + p b[n][0] [n] b n 0 p b[k][1] == b[n][1] + q b[k][1] [k] b k 1 b[n][1] + q b[n][1] [n] b n 1 q res = max(res, dfs(k, p, q)) res max(res, dfs(k, p, q)) max res dfs(k, p, q) dfs k p q vis.discard(n) vis.discard vis discard n return res + 1 res + 1 res 1 n n p p q q for i in range(N):
  for j in range(N):
    vis = set()
    viss = set()
    p = b[j][0] - b[i][0]
    q = b[j][1] - b[i][1]
    temp = 0
    for n in range(N):
      if n in viss: continue
      t = dfs(n, p, q)
      if t > 1:
        temp += t - 1
    res = max(temp, res)
    #print(temp, p, q) i range(N) range N for j in range(N):
    vis = set()
    viss = set()
    p = b[j][0] - b[i][0]
    q = b[j][1] - b[i][1]
    temp = 0
    for n in range(N):
      if n in viss: continue
      t = dfs(n, p, q)
      if t > 1:
        temp += t - 1
    res = max(temp, res)
    #print(temp, p, q) j range(N) range N vis = set() vis set() set viss = set() viss set() set p = b[j][0] - b[i][0] p b[j][0] - b[i][0] b[j][0] [j] b j 0 b[i][0] [i] b i 0 q = b[j][1] - b[i][1] q b[j][1] - b[i][1] b[j][1] [j] b j 1 b[i][1] [i] b i 1 temp = 0 temp 0 for n in range(N):
      if n in viss: continue
      t = dfs(n, p, q)
      if t > 1:
        temp += t - 1
     n range(N) range N if n in viss: continue
       n in viss n viss t = dfs(n, p, q) t dfs(n, p, q) dfs n p q if t > 1:
        temp += t - 1
     t > 1 t 1 temp += t - 1 temp t - 1 t 1 res = max(temp, res) res max(temp, res) max temp res print(N - res) print N - res N res viss = set() set() viss p = b[j][0] - b[i][0] b[j][0] - b[i][0] p t = dfs(n, p, q) dfs(n, p, q) t q = b[j][1] - b[i][1] b[j][1] - b[i][1] q temp += t - 1 t - 1 temp res = max(temp, res) max(temp, res) res vis = set() set() vis temp = 0 0 temp input = sys.stdin.readline sys.stdin.readline input vis = set() set() vis N = int(input()) int(input()) N b = [list(map(int, input().split())) for _ in range(N)] [list(map(int, input().split())) for _ in range(N)] b res = 0 0 res viss = set() set() viss def dfs(n, p, q):
  global vis
  global viss
  res = 0
  vis.add(n)
  viss.add(n)
  for k in range(N):
    if k in vis: continue
    if k in viss: continue
    if (b[k][0] == b[n][0] + p) and (b[k][1] == b[n][1] + q):
      res = max(res, dfs(k, p, q))
  vis.discard(n)
  return res + 1 def dfs(n, p, q):
  global vis
  global viss
  res = 0
  vis.add(n)
  viss.add(n)
  for k in range(N):
    if k in vis: continue
    if k in viss: continue
    if (b[k][0] == b[n][0] + p) and (b[k][1] == b[n][1] + q):
      res = max(res, dfs(k, p, q))
  vis.discard(n)
  return res + 1 dfs
import sys
input = sys.stdin.readline

N = int(input())
b = [list(map(int, input().split())) for _ in range(N)]
b.sort(key = lambda x: (x[0], x[1]))
vis = set()
viss = set()
res = 0
def dfs(n, p, q):
  global vis
  global viss
  res = 0
  vis.add(n)
  viss.add(n)
  for k in range(N):
    if k in vis: continue
    if k in viss: continue
    if (b[k][0] == b[n][0] + p) and (b[k][1] == b[n][1] + q):
      res = max(res, dfs(k, p, q))
  vis.discard(n)
  return res + 1
for i in range(N):
  for j in range(N):
    vis = set()
    viss = set()
    p = b[j][0] - b[i][0]
    q = b[j][1] - b[i][1]
    temp = 0
    for n in range(N):
      if n in viss: continue
      t = dfs(n, p, q)
      if t > 1:
        temp += t - 1
    res = max(temp, res)
    #print(temp, p, q)
print(N - res)