require 'set'
n = gets.to_i

xy = n.times.map{ gets.split.map(&:to_i) }
min = n
combis = 0.step(n-1).to_a.combination(2)

combis.each.map do |c1|
  dx1 = xy[c1[0]][0] - xy[c1[1]][0]
  dy1 = xy[c1[0]][1] - xy[c1[1]][1]
  cnt = combis.count do |c2|
    dx2 = xy[c2[0]][0] - xy[c2[1]][0]
    dy2 = xy[c2[0]][1] - xy[c2[1]][1]
    (dx1 == dx2 && dy1 == dy2) || (dx1 == -dx2 && dy1 == -dy2)
  end
  min = (n - cnt) if (n - cnt) < min
end

p min
