Testing
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
This year Andrew must pass testing at school including math course. He aggressively prepare himself - he already solves complex trigonometric equations easily do stereometry, but with rational numbers (fractions) things are bad, especially with their addition. He even afraids to make a mistake in writing the testing program. Do it for him. Recall that a rational number is defined as an irreducible fraction, where the numerator is an integer, and the denominator is a natural number.
Input
Four integer - the numerator and denominator of the first fraction and the numerator and denominator of the second fraction. All numbers are not greater 10^5
by absolute value.
Output
Print the numerator and denominator of the fraction's sum.
\
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 6K
Acceptance rate 17%