Relay
After Euro 2012, our renowned compatriots Kotyhoroshko, Vernygora, and Pan Kotsky made many new friends worldwide. This year, they decided to embark on a journey to visit these friends in various countries.
Their first destination was the Flower City, home to the shorties Neznaiko and his friends. Coincidentally, on the day of their arrival, a cycling relay race was underway, featuring bicycles crafted by Gvyntyk and Shpuntik. These unique bicycles each had a fixed speed, though the speeds varied between different bicycles.
Pan Kotsky decided to join the race, opting to ride the entire distance solo on a standard bicycle. What constant speed should Pan Kotsky maintain to complete the distance in the same time as the shorties? Note that all relay stages are of equal length.
Input
1-st line: K – the number of relay stages (1 ≤ K ≤ 1000).
2-nd line: M_1/N_1 M_2/N_2 ... M_K/N_K – the speeds of the shorties at each relay stage, expressed as simple fractions separated by spaces. M_{i}, N_{i} – integers (1 ≤ M_{i}, N_{i} ≤ 10).
Output
M/N – the required speed of Pan Kotsky, presented as a simple irreducible fraction.