Problem: Several days ago you bought a new house and now you are planning to start a renovation. Since winters in your region can be very cold you need to decide how to heat rooms in your house.
Your house has rooms. In the -th room you can install at most heating radiators. Each radiator can have several sections, but the cost of the radiator with sections is equal to burles.
Since rooms can have different sizes, you calculated that you need at least sections in total in the -th room.
For each room calculate the minimum cost to install at most radiators with total number of sections not less than .
Input Format: The first line contains single integer () — the number of rooms.
Each of the next lines contains the description of some room. The -th line contains two integers and () — the maximum number of radiators and the minimum total number of sections in the -th room, respectively.
Output Format: For each room print one integer — the minimum possible cost to install at most radiators with total number of sections not less than .
Note: In the first room, you can install only one radiator, so it's optimal to use the radiator with sections. The cost of the radiator is equal to .
In the second room, you can install up to radiators, but since you need only one section in total, it's optimal to buy one radiator with one section.
In the third room, there variants to install radiators: , , , , , , . The optimal variant is and it costs .