“Don’t practice until you get it right. Practice until you can’t get it wrong”

Bangladesh is the host country for the $45^{th}$ Annual ICPC World Finals 2021.

For a successful event arrangement, a volunteer training program has been arranged with many trainees. The season was full of some activities like leadership, fundamental skills of volunteers, problem-solving, decision-making, and different challenges of volunteering, etc. All the trainees were very attentive and took part in the activities spontaneously.

At the end of the event, snacks will be provided for everyone. Opera is the organizer of the food distribution system. Currently, she has $M$ dollars for food expenses. But she is not sure how many people will come for the snacks, so she wants to buy as many as snacks with the money she has for safety. Fortunately, a Buy 2 Get 1 Offer is running on pizza in a nearby shop. That means-

“If you purchase$2$pizzas then you will get$1$pizza for free”.

The price of one (1) mini-size $6$-inch pizza is $X$ dollars.

Write a program to determine the maximum number of pizzas she can purchase from that shop. She can buy a pizza if and only if the total cost after purchasing that pizza does not exceed the dollar she has.

Input

The first line of the input contains $T$ - the number of test cases. Then the following $T$ lines contain two integers $M$ and $X$ separated by spaces.

$1 <= T <= 50$

$1 <= M, X <= 10^{3}$

Output

Output a single integer for each test case, the maximum number of pizzas Opera can purchase.