The least common multiple (LCM) of two numbers is the smallest number (excluding zero) that is a multiple of both of the numbers. ... The greatest common factor of two (or more) numbers is the product of all the prime factors the numbers have in common.