n = gets.to_i
balls = []
n.times { balls << gets.split.map(&:to_i) }
inclination_memo = Hash.new(0)

balls.each_with_index do |(x, y), i|
  balls.each_with_index do |(x2, y2), i2|
    break if i <= i2
    inclination_memo[[x2 - x, y2 - y]] += 1
  end
end

puts n - (inclination_memo.values.max || 0)
