Работоспособность Codeforces может быть ограничена с 18 июня, 22:00 (МСК) по 19 июня, 6:00 (МСК) в связи с проведением технических работ. Polygon будет работать в обычном режиме. ×

K. PTT
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

In Arcaea, there's a value called Potential (often abbreviated as "PTT") to measure a player's game level. It acts as a representative value of the player's best and recent performances.

Here, you'll learn how to calculate a player's potential score of a single gameplay.

There are two relevant quantities to the potential, each explained in its own section.

Chart Constant

The Chart Constant is an internal value assigned to a chart, which is a value between 1.0 and 11.5 with one decimal place. This value reflects the difficulty of a chart. However,some angry players believe that the unreasonable last decimal was rolled with dice.

Score Modifier

The Score Modifier is a value computed from your score in a round. It can be positive or negative, depending on whether your score is above or below 9,500,000.

Below is a table showing the formula for calculating the score modifier for various score ranges.

ScoreScore Modifier
$$$\ge10\,000\,000$$$$$$2.0$$$
$$$9\,800\,000-9\,999\,999$$$$$$1.0+(Score-9\,800\,000)/200\,000$$$
$$$\le9\,800\,000$$$$$$(Score-9\,500\,000)/300\,000$$$

Play Rating

And now you are able to calculate the rating of one single gameplay. Just add the chart constant with score modifier, and set it to zero if it's below zero. We call it play rating.

Now you are given T groups of gameplay with score and chart constant, please calculate the play rating of each gameplay.

Input

The first line contains one integer $$$T$$$ ($$$1\le T\le 100000$$$) denoting the number of gameplays.

Each of the following $$$T$$$ lines contains one integer $$$n$$$ ($$$0\le n\le 10001576$$$), and one number with one decimal place $$$c$$$ ($$$1.0\le c\le 11.5$$$), denoting the score and chart Constant of one single gameplay.

Output

Output T lines, each line with a real number denoting a play rating. Your answer is considered correct if the absolute or relative error with standard output doesn't exceed $$$10^{-6}$$$.

Example
Input
3
10001343 9.5
9988535 11.3
9794071 11.0
Output
11.5000000
13.2426750
11.9802367