e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Problems

Square of maximum

Square of maximum

Three-digit number is given. Rearrange its digits so that to get the maximum number (written with the same digits). Then this maximum number should be squared and printed.

Input

One three-digit positive integer.

Output

Print the square of maximum number.

Time limit 1 second
Memory limit 128 MiB
Input example #1
327
Output example #1
535824