Two positive integers $m$ and $n$ are both less than $500$ and $\text{lcm}(m,n) = (m-n)^2$. What is the maximum possible value of $m+n$?

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