Extended Euclidean Algorithm - Preparation to IOI Part 6