implemented gcd(), lcm(), and lcmm().