Problem Description

Two fractions are provided as p/q form. Add them and output result in reduced form p/q with q positive.

Input Format

Two lines: f1 then f2.

Output Format

One fraction p/q.

Sample Test Case

Input:
1/6 1/3
Output:
1/2

Constraints

|p|,|q|

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next