I just started learning Ruby a few weeks ago so I apologize for being a complete noob. I am writing a simple program that will find the largest phone number input based on the sum of its digits. Here is what I have so far:

```
print 'Enter phone numbers'
phone_numbers = (gets.chomp)
phone_array = phone_numbers.split(",")

values = Hash.new(0)

phone_array.each { |x| values[x] += x.delete('-').to_s.split('').map(&:to_i).inject(:+)}

values.each { |k, v| puts k if v == values.values.max }

```

My question is: how do I get ruby to give me the phone number corresponding to a specific max value if there are equal max values? I would like the tie-breaking strategy to be last max value encountered. for example if I enter 111-111-1112,111-111-1121 I would like the output to be 111-111-1121.