Understand the method
For 12 and 18, the common positive factors are 1, 2, 3, and 6, so the GCD is 6. Their positive multiples include 12, 24, 36… and 18, 36…, so the LCM is 36. A useful relationship for two positive integers is GCD(a,b) × LCM(a,b) = a × b.