from operator import itemgetter
from collections import defaultdict
n = int(input())
if n == 1:
  print(1)
  exit()
xy = sorted([list(map(int, input().split())) for i in range(n)], key = itemgetter(0,1))
a = defaultdict(int)
for key,(x1,y1) in enumerate(xy):
  for x2,y2 in xy[key+1:]:
    p,q = x2-x1, y2-y1
    if p != 0 or q != 0:
      a[(p,q)] += 1
ans = n - max(a.values())
print(ans) from operator import itemgetter from collections import defaultdict n = int(input()) n int(input()) int input() input if n == 1:
  print(1)
  exit() n == 1 n 1 print(1) print 1 exit() exit list(map(int, input().split())) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split xy = sorted([list(map(int, input().split())) for i in range(n)], key = itemgetter(0,1)) xy sorted([list(map(int, input().split())) for i in range(n)], key = itemgetter(0,1)) sorted [list(map(int, input().split())) for i in range(n)] key = itemgetter(0,1) key itemgetter(0,1) itemgetter 0 1 a = defaultdict(int) a defaultdict(int) defaultdict int for key,(x1,y1) in enumerate(xy):
  for x2,y2 in xy[key+1:]:
    p,q = x2-x1, y2-y1
    if p != 0 or q != 0:
      a[(p,q)] += 1 key (x1,y1) x1 y1 enumerate(xy) enumerate xy for x2,y2 in xy[key+1:]:
    p,q = x2-x1, y2-y1
    if p != 0 or q != 0:
      a[(p,q)] += 1 x2 y2 xy[key+1:] xy key+1: key+1 key 1 p,q = x2-x1, y2-y1 p x2-x1 x2 x1 q y2-y1 y2 y1 if p != 0 or q != 0:
      a[(p,q)] += 1 p != 0 or q != 0 p != 0 p 0 q != 0 q 0 a[(p,q)] += 1 a[(p,q)] a (p,q) p q 1 ans = n - max(a.values()) ans n - max(a.values()) n max(a.values()) max a.values() a.values a values print(ans) print ans n = int(input()) int(input()) n p,q = x2-x1, y2-y1 x2-x1 p xy = sorted([list(map(int, input().split())) for i in range(n)], key = itemgetter(0,1)) sorted([list(map(int, input().split())) for i in range(n)], key = itemgetter(0,1)) xy q = x2-x1, y2-y1 y2-y1 q a = defaultdict(int) defaultdict(int) a ans = n - max(a.values()) n - max(a.values()) ans
from operator import itemgetter
from collections import defaultdict
n = int(input())
if n == 1:
  print(1)
  exit()
xy = sorted([list(map(int, input().split())) for i in range(n)], key = itemgetter(0,1))
a = defaultdict(int)
for key,(x1,y1) in enumerate(xy):
  for x2,y2 in xy[key+1:]:
    p,q = x2-x1, y2-y1
    if p != 0 or q != 0:
      a[(p,q)] += 1
ans = n - max(a.values())
print(ans)