e-olymp
Competitions

Week 10: January 18 - 24

Fractions: minimum and maximum

Two fractions are given. Find their minimum and maximum.

Input

Two fractions a / b and c / d. All numbers are positive integers no more than 109.

Output

Print first minimum and then maximum fraction.

Time limit 1 second
Memory limit 128 MiB
Input example #1
4/5 2/3
Output example #1
2/3 4/5
Input example #2
7/4 9/5
Output example #2
7/4 9/5
Author Michael Medvedev