finding gcd and lcm of a numbers