At Majestic bus stand, Bus A leaves every a minutes and Bus B leaves every b minutes. Both left together just now.
After how many minutes will they leave together again? That is the LCM (least common multiple) of a and b.
Input Format
A single line with two integers a and b.
Output Format
Print the LCM of a and b.
Constraints
• 1 ≤ a, b ≤ 10^5
• The answer can be up to 10^10. Use long long or long.
Examples
Example 1
Explanation Bus A: 4, 8, 12… Bus B: 6, 12… They meet at 12.
Example 2
Explanation No common factor, so 5 × 7 = 35.
Example 3
Explanation Every time B leaves at a multiple of 10, A also leaves, so 10.
Acceptance
—
Accepted
0
Submissions
0