How to determine the original $2$-digit number?

A $2$-digit number not containing a $0$, is raised to its $5$ th power. The last $5$ digits of this power are given.

How can we determine the original number ?

The number can be uniquely determined because the residues modulo $10^5$ are all distinct. The second digit of the original number is trivial to find. It is just the last digit of the given digit-string.

But how can we determine the first digit without brute force ? It would be best if the digit could be determined without electronic help fast. Any ideas ?

• If you have $10a$ as your starting number, you have a string of 5 zeroes for the last 5 digits. So, at the very least know that what we have is not $1-1$ and there may not be an inverse. – Doug M May 23 '17 at 22:24
• @DougM Yes, that is the reason that I ruled out the $0$ digit in the original number. Then, there is a $1-1$ correspondence. – Peter May 23 '17 at 22:36