Competitions

# Fractions: multiplication and division

Two fractions are given. Find their product or quotient.

#### Input

Each line contains an example of multiplication or division of fractions. The numerator and denominator of each fraction is a positive integer, not greater than 109.

#### Output

For each input example, print in a separate line the answer in the form of an irreducible fraction.

Time limit 1 second
Memory limit 128 MiB
Input example #1
2/3 * 5/6
1/2 / 4/5
7/8 * 11/41
7/1 / 3/7

Output example #1
5/9
5/8
77/328
49/3

Author Michael Medvedev