Problem D
Associative Exponents

The Association for Curtailing Parentheses in Computations is having some trouble. Some members learned in class that $a^{b^ c} = a^{(b^ c)}$, but others insist that ${a^ b}^ c = {(a^ b)}^ c$. You are trying to keep the peace by assuring them that it works either way, but you just noticed that ${(2^3)}^2 = 64 \neq 512 = 2^{(3^2)}$. Can you write a program to help the association members focus on what they can all agree on?


Input consists of three space-separated integers $1 \leq a, b, c \leq 2 \cdot 10^6$ on a single line.


If $a^{(b^ c)} = {(a^ b)}^ c$, output “What an excellent example!” and if $a^{(b^ c)} \neq {(a^ b)}^ c$ output “Oh look, a squirrel!

Sample Input 1 Sample Output 1
2 3 2
Oh look, a squirrel!
Sample Input 2 Sample Output 2
1 1 1
What an excellent example!

Please log in to submit a solution to this problem

Log in