Compute the sum of the two smallest positive integers $b$ with the following property: there are at least ten integers $0 \le n < b$ such that $n^2$ and $n$ end in the same digit in base $b$.

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