n = gets.to_i
xys = n.times.map{ gets.split.map(&:to_i) }

if n == 1
  p 1
else
  ary = []
  xys.combination(2).to_a.map do |xy|
    p1, p2 = xy
    dx = p1[0] - p2[0]
    dy = p1[1] - p2[1]
    ary << [dx, dy]
    ary << [-dx, -dy]
  end
  s = ary.group_by(&:itself).map{|k, v| v.size}.max
  p n - s
end