Watch this video
The idea is similar to the one for digit number. However when you look at square the last digit could be
and so we need a test to decide. So we find the first digit and then multiply by its successive if its greater than we have the lower value