Modifying syntax and order
Problem 5 via reduction by GCD (Euclid's algo)