Let $N$ be a positive integer such that $N$ and $N^2$ both end in the same four digits $\overline{abcd}$, where $a \ne 0$. What is the four-digit number $\overline{abcd}$?
Problem
Source: 2019 Dürer Math Competition Finals Day2 E+8 https://artofproblemsolving.com/community/c1621835_2019_
Tags: number theory, Digits, last digits