N =gets.to_i
balls = N.times.map do
  input = gets.split
  {x: input.first.to_i, y: input.last.to_i }
end

distances = {}

while(!balls.empty?)
  target_ball = balls.shift

  balls.each do |ball|
    dif_pos = [
      target_ball[:x] - ball[:x],
      target_ball[:y] - ball[:y]
    ]
    distances[dif_pos] = (distances[dif_pos] || 0) + 1
  end
end

puts N - (distances.values.max || 0)