Euclidean algorithm
The Extended Euclidean algorithm always produces one of these two minimal pairs.