gcd, lcm over the rationals with respect to the integers