Problem F. Fractional multiplication

Author:A. Baranov   Time limit:1 sec
Input file:Standard input   Memory limit:256 Mb
Output file:Standard output  

Statement

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 format

Input contains integer N, followed by N pairs of integers (Ai, Bi).

Output format

Output must contain a single integer — answer to the problem.

Constraints

1 ≤ N ≤ 200, 1 ≤ (Ai, Bi) < 232

Sample tests

No. Standard input Standard output
1
1
35880 17940
0
2
1
76824 12804
1
3
1
94803 11573
2

0.136s 0.019s 13