Module: GCD (Greatest Common Divisor)


Problem

8 /10


oranges

Problem

Katya decided to invite n friends to visit her. Since her friends are very fond of fruits, she bought m identical oranges as a treat for them. She wants to cut each orange into the same number of equal slices so that they can be distributed among the guests (Katya herself will not eat oranges), and everyone gets the same number of slices.

Write a program that calculates the minimum number of slices each orange must be cut into to satisfy the above conditions.
 
Input 
The input string contains two positive integers n and m (\(1 <= n, m <= 10^9 \)).

Imprint 
Print the answer to the problem.
 
Examples
# Input Output
1 2 5 2
2 2 4 1