Bouncing Ball

No attempts yetTime limit1sMemory limit512 MB

Problem

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 xx.

Right after being dropped, the ball's (peak) height is xx, and every bounce doubles the peak height it reaches. So after kk bounces the peak height the ball reaches is x2kx \cdot 2^{k}.

Determine after how many bounces the ball's height first becomes at least ww. The initial height xx, before any bounce, counts as a candidate; in particular, if wxw \le x the answer is 00.

Input

The first line contains the number of datasets nn (1n1061 \le n \le 10^{6}).

Each of the next nn lines contains two integers xx and ww (1x1091 \le x \le 10^{9}, 0w1090 \le w \le 10^{9}), where xx is the drop height and ww is the target height.

Output

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 ww, i.e. the smallest non-negative integer kk such that x2kwx \cdot 2^{k} \ge w.