N =gets.to_i
balls = N.times.map do
  gets.split.map(&:to_i)
end

distances = {}

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

  balls.each do |ball|
    dif_pos = [
      (ball.first - target_ball.first).abs,
      (ball.last - target_ball.last).abs
    ]
    distances[dif_pos] = (distances[dif_pos] || 0) + 1
  end
end

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