Reduce the Fraction
Reduce the fraction A/B to lowest terms.
Input: one line with two positive integers A and B.
Output: the reduced fraction as p/q.
Constraints:
- 1 ≤ A, B ≤ 1018
Sample Tests
Input 1
12 18
Output 1
2/3
Input 2
7 13
Output 2
7/13
Discussion (opens after you solve — no spoilers before)
No comments yet.