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,
      ball.last - target_ball.last
    ]
    if distances[dif_pos].nil?
      distances[dif_pos] = 1
    else
      distances[dif_pos] += 1
    end
  end
end

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