Approach hintTry it first, then revealHide
Going backwards is deterministic: the larger coordinate must have absorbed the smaller one in the last move. Subtract in bulk with a modulo step, as in the Euclidean algorithm, and stop carefully once one coordinate meets its source value.