Fractional arithmetic
Write a program that realizes the addition, subtraction, multiplication and division of fractions. Format fractions in the input and output data:
Number sign (written only when it changes the number of absence);
Integer part of (zero integer part is not written, if the numerator and denominator);
Blank (not written, unless there is an entire or fractional part);
Numerator (if not zero);
Sign / (if the numerator);
Denominator (if the numerator).
Examples of representations of fractional numbers: -7 3/4, 8 1/2, -7/11, 0, 11.
Input
In the first line of input fraction (first operand), the second - a sign of operation ("+" - adds, "-" - subtract, "*" - multiplication, "/" - division) in the third line - fraction (second operand) . Both fractions can be reducible.
The integer part can take the value from the range 0 .. 30000, the numerator and denominator can take values from 1 to 30000, by dividing the second operand is not zero.
Output
In a single line displays an irreducible proper fraction (result) in the above format.