407066: GYM102697 037 Practice Katanas

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

037. Practice Katanastime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

You've just bought a set of practice katanas, which have an item number of 1101-1816. While staring at this item number, you wonder what the LCM (Least Common Multiple) of 1101 and 1816 is.

To calculate the LCM of two numbers, you can multiply the two numbers together, and divide this result by the GCD (Greatest Common Divisor) of the two numbers. For example, let's take the numbers 60 and 72. Their GCD is 12 (12 is the greatest number that divides both numbers), their product (60 x 72) is 4320, and their GCD is 4320 / 12 = 360. To calculate the GCD of two numbers, you can use this recursive formula:

gcd(a, b) = a, if b = 0

otherwise, gcd(a, b) = gcd(b, a mod b)

Input

The only line of input contains two positive integers $$$a$$$ and $$$b$$$.

Output

Output a single positive integer $$$n$$$: the LCM (Least Common Multiple) of $$$a$$$ and $$$b$$$.

ExamplesInput
2 4
Output
4
Input
1101 1816
Output
1999416

加入题单

算法标签: