Test lcm and gcd.