Find the length of the longest sequence of equal nonzero digits in which an integral square can terminate (in base 10) and find the smallest square which terminates in such a sequence.

Let's think step by step and output the final answer within \boxed{}.
user