This page is still under construction.

Parts of this page are still being built. What you see may change.

New Financial Year

Interview

Time limit1sMemory limit512 MB

Summary
Given the new price P and the percent change C for each flavor, recover the original price O using the formula C = 100(P-O)/O.
Level

Easy2 of 10

Topics
Math, Implementation, Array
Solved
No attempts yet

Problem

Naomi has spent the past year tracking her doughnut sales. With so many different flavours, some are bound to sell more than others. To maximize her sales for the coming year, she keeps track of certain information on each flavour. She tracks exactly NN different flavours of doughnuts. For each flavour, she tracks OO, the original price, PP, the new price, and CC, the relative change in price. The relative change in price is computed using the formula C=100%⋅(P−O)/OC=100\% \cdot (P-O)/O.

Unfortunately, during one of her late nights, while analyzing her clipboard of data, she spilled coffee over the entire section of the page that keeps track of the original price of each doughnut flavour.

Can you help Lesley recover her data, specifically OO, the original price of each doughnut flavour?

Input

The first line contains a single integer NN, the number of doughnut flavours (1≤N≤1041 \le N \le 10^4).

Each of the following NN lines describes one flavour and contains two real numbers PP and CC (1≤P≤1000.001 \le P \le 1000.00, −1000.00≤C≤1000.00-1000.00 \le C \le 1000.00), given to exactly 2 decimal places.

Output

Output NN lines. On line ii, print OO, the original price of the ii-th doughnut flavour, with absolute or relative error at most 10−510^{-5}.

Examples1

  1. Example 1

    Input
    2
    100.00 10.50
    50.00 -50.75
    
    Expected output
    90.497737557
    101.522842640