99. Add Two Fractions
A fraction has a numerator and a denominator.
Read two fractions as a b and c d on separate lines, meaning a/b and c/d, and
print their sum in lowest terms as numerator denominator.
The denominator must always come out positive, and a result of zero must be printed as
0 1.
Constraints - `-1000000 ≤ numerators ≤ 1000000` - `1 ≤ denominators ≤ 1000000`
Input
Two lines, each containing two integers, a numerator and a denominator.
Output
Print two integers on one line, separated by a single space, the numerator, then the denominator, reduced to lowest terms with a positive denominator. Zero prints as 0 1.
Hints
Four rungs, in order. The last two open once you have submitted an attempt. A wrong one counts.