Japt, 13 12 11 bytes
sw
*V/yU ²
Explanation
Implicit input of integer U
. The empty line at the beginning, prevents the following line from overwriting U
sw
Convert U
to a string (s
), reverse it (w
), convert back to an integer and assign to variable V
.
*V
Multiply U
by V
.
/
Divide.
yU
GCD of V
and U
.
²
Squared. Implicit output of resulting integer.
Alternative, 13 bytes
Just because I like being able to use N
.
NpUsw)mxNry)×