gcd, lcm and factors are working.