I have the following relations
$a x \equiv b \pmod m\;\;,\;\; m y\equiv b \pmod a$
Now, I need to find the minimum possible positive values for $x$ and $y$.
Extended Euclid Algorithm doesn't guarantee neither minimum nor positive, it seems.
I tried to solve this with Extended Euclid Algorithm as described in Wikipedia. It produces negative results and even if it is positive, it is not the minimum possible.
Please help me understand the method with which I can get the solution.