In the context of online games, a whale is a player who spends great sums of real money on video games. A certain whale has discovered
Input Specification
Line
Lines
Output Specification
Two space separated integers, the values
Constraints
Sample Input
3
1 4
2 1
1 1
Sample Output
1 4
Explanation for Sample Output
The first membership lasts for 4 days, which is greater than the duration of the other two memberships (lasting only
Since it is the cheapest membership (in this case, the only one) lasting
Comments
I'm confused, which takes more priority, maximizing the duration of the membership or minimizing the cost? (Example: One option costs 2 and lasts for 2 days and another option costs 4 and lasts for 4 days)
He always want to take the longest membership. If there is more than one membership with the longest duration, then he chooses the cheapest one.