Given a fraction \(a \over b\). It is required to reduce it, that is, write the same number in the form \(c \over d\), where c
— integer, d
is a natural number and d
is the smallest possible.
Input
Enter two integers a
and b
(\(-100<=a<=100,\ 0<b<=100 \)).
Imprint
Output two numbers c
and d
.
Examples
# |
Input |
Output |
1 |
3 6 |
1 2 |
2 |
-2 5 |
-2 5 |
Запрещенные операторы:gcd