Let M be the greatest integer such that both M+2025 and M+5025 are perfect squares. What is the units digit of M?
1
2
3
6
8