This problem is a programming version of Problem 99 from projecteuler.net
Comparing two numbers written in index form like and is not difficult, as any calculator would confirm that .
However, confirming that would be much more difficult, as both numbers contain over three million digits.
You are given base exponent pairs, each forming a large number you have to find the smallest number of them. is .
First line containts an integer , number of base exponent pairs. Followed by lines each have two space separated integers and , representing base and exponent.
Last line containts an integer , where
No two numbers are equal.
Print the base and exponent in one line separated by space.