def main
  ball_num = gets.chomp.to_i
  return 1 if ball_num == 1
  
  ball_position = []
  ball_diff_info = []
  ball_num.times { |_i| ball_position << gets.chomp.split(' ').map(&:to_i) }
  
  ball_position.each_with_index do |(x,y),idx|
    ball_position_2 = ball_position.dup
    ball_position_2.delete_at(idx)
    
    ball_position_2.each do |a,b|
      ball_diff_info << [a-x, b-y]
    end
  end
  
  cost_zero_num = ball_diff_info.group_by{|e| e}.sort_by{|k,v| -v.size}.first.last.size
  
  ball_num - cost_zero_num
end

puts main