Fraction - MarisaOJ: Marisa Online Judge

Fraction

Time limit: 1000 ms
Memory limit: 256 MB
Find the irriducible form of the fraction $\frac{a}{b}$. ### Input - A single line contains two integers $a,b$. ### Output - Print two integers, the first one is the numerator, the second one is the denominator of the irriducible fraction. ### Constraints - $1 \le a,b \le 10^6$. ### Example Input: ``` 6 9 ``` Output: ``` 2 3 ```