report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
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 ```
Loop
Loop
Even numbers
Factorial
Star Triangle
Folding paper
Fraction
Divisors
Complex Exponentiation
Prime number
Digit Sum
Fibonacci
Read number till eternity
Extremal
Reverse
Mushroom exchanging
Trailing zeros
Decimal to binary
Binary to decimal
Division
Solution
Topic
Basic
Rating 800
Solution (0) Solution