A famous theorem of the mathematician Pierre de Fermat, proved after more than 300 years, states that, for any natural number , there is no natural solution (except for or ) to the equation For , by contrast, there are infinite non-trivial solutions. For instance, , , , ….
Write a program that, given four natural numbers with and , prints a natural solution to the equation such that and .
Input consists of four natural numbers such that and .
Print a line following the format of the examples, with a natural
solution to the equation
that fulfills
and
.
If there is more than one solution, print the one with the smallest
.
If there is a tie in
,
print the solution with the smallest
.
If there are no solutions, print “No solution!”.
Input
2 5 4 13
Output
3^2 + 4^2 = 5^2
Input
1 1 1 1
Output
No solution!