The Greatest Common Divisor (GCD) of two integers is the largest positive integer that divides both numbers without a remainder.
The Least Common Multiple (LCM) of two integers is the smallest positive integer that is divisible by both numbers without a remainder.
The GCD and LCM are calculated on the absolute values of the input numbers.
The GCD of 12 and 18 is 6 since 6 is the largest integer that divides both 12 and 18 without a remainder. The LCM of 12 and 18 is 36 since 36 is the smallest integer that is divisible by both 12 and 18 without a remainder.