# 2.1 GCDs

## GCDs II

Compute the GCD of the following two numbers:

$$x=17^{88}\cdot 31^5\cdot 37^2\cdot 59^{1000} \\ y=19^{9^{22}}\cdot 37^{12}\cdot 53^{3678}\cdot 59^{29}$$

Use $$^$$ for exponentiation and $$*$$ for multiplication in your answer.

Exercise 1

To get the GCD of two numbers: iterate over all primes that appear in both factorizations; raise each of them to the smallest of its two exponents; then multiply the resulting powers.

By the way, if in this procedure you replace the smallest with the greatest, the return value will be the LCM (least common multiple) of the two numbers.