Asia got a magic ball for her birthday. Whenever the ball is dropped from some height, it bounces back up to twice that height. Asia dropped the ball off a balcony from height x.
Right after being dropped, the ball's (peak) height is x, and every bounce doubles the peak height it reaches. So after k bounces the peak height the ball reaches is x⋅2k.
Determine after how many bounces the ball's height first becomes at least w. The initial height x, before any bounce, counts as a candidate; in particular, if w≤x the answer is 0.
The first line contains the number of datasets n (1≤n≤106).
Each of the next n lines contains two integers x and w (1≤x≤109, 0≤w≤109), where x is the drop height and w is the target height.
For each dataset, print a single integer on its own line: the number of bounces after which the ball's height first reaches at least w, i.e. the smallest non-negative integer k such that x⋅2k≥w.