Factorize each number into its prime factors, then multiply the highest power of each prime factor.