Ways to calculate GCD.