| Author: | A. Baranov | Time limit: | 1 sec | |
| Input file: | Standard input | Memory limit: | 256 Mb | |
| Output file: | Standard output |
There is a set of N rational fractions, each is represented by corresponding numerator Ai and denominator Bi.
You must write a program that outputs:
Input contains integer N, followed by N pairs of integers (Ai, Bi).
Output must contain a single integer — answer to the problem.
1 ≤ N ≤ 200, 1 ≤ (Ai, Bi) < 232
| No. | Standard input | Standard output |
|---|---|---|
| 1 |
|
|
| 2 |
|
|
| 3 |
|
|