Fegla, also known as mmaw, coaches a lot of teams. All of them train together in one place, and that place has poor ventilation and is quite small for the number of teams. Under those conditions a strange creature showed up: the bed bug.
Bed bugs are parasites that feed on human blood by biting people. What puzzled Fegla is that some team members were never bitten at all. He cared more about wiping the bugs out, though. After watching them for a while he concluded that he had to stop them from reproducing, and they only reproduce when they get very close to each other.
So Fegla needs your help. You are given a straight line of N empty cells and K bed bugs. A cell holds at most one bug. Place the bugs so that the minimum number of empty cells between two consecutive bugs is as large as possible.
For N=4 and K=2 the best placement leaves 2 empty cells between the two bugs.
| Bed Bug | Empty | Empty | Bed Bug |
The first line contains an integer T, the number of test cases.
Each of the next T lines contains two integers N and K separated by a space.
For each test case, print the answer on its own line. The answer is the largest value that the minimum number of empty cells between two consecutive bugs can reach over all placements.