Problems

# Fractions: addition and subtraction

# Fractions: addition and subtraction

Two fractions are given. Find their sum or difference.

#### Input

Each line contains an example of addition or subtraction of fractions. The numerator and denominator of each fraction is a positive integer, not greater than `10`

.^{9}

#### Output

For each input example, print in a separate line the answer in the form of an irreducible fraction. If the answer is negative, a minus sign in front of the fraction should be printed.

Input example #1

1/2 + 3/4 4/5 - 7/3 3/2 + 5/6 7/6 - 1/6 3/2 - 3/2

Output example #1

5/4 -23/15 7/3 1/1 0/1