A number is called massive if it can be written in the form a^n, that is, raised to the power of .
You are given two massive numbers a^b and c^d, each written in the format "base^exponent". Your task is to compare these two numbers.
Two massive numbers in the format "base^exponent" (1 \le \text{base}, \text{exponent} \le 1000). It is guaranteed that the two numbers are different.
Print the greater of the two given massive numbers.
Example 1
Example 2