def main
  ball_num = gets.chomp.to_i
 
  ball_position = []
  ball_diff_info = {}
  ball_num.times { |_i| ball_position << gets.chomp.split(' ').map(&:to_i) }
  
  ball_position.each do |x,y|
    delete_index = ball_position.index([x, y])
    ball_position_2 = ball_position.dup
    ball_position_2.delete_at(delete_index)
    
    ball_position_2.each do |a,b|
      
      ball_diff_info[[a-x, b-y]] ||= 0
      ball_diff_info[[a-x, b-y]] += 1
    end
  end
  
  cost_zero_num = ball_diff_info.sort_by{|k,v| v}.last.last
  
  ball_num - cost_zero_num
end

puts main