There's a general formula for equations like these. I'll get you started and leave some details to fill in (like making sure you get every solution).
We already know one solution . Suppose that there's another solution . Then
, so .
Now and for some , which upon substitution and cancellation leads to .
Now when will a multiple of equal a multiple of ? Think of their gcd.