#P1437A. Marketing Scheme

    ID: 1191 远端评测题 1000ms 256MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>brute forceconstructive algorithmsgreedymath*800

Marketing Scheme

Description

You got a job as a marketer in a pet shop, and your current task is to boost sales of cat food. One of the strategies is to sell cans of food in packs with discounts.

Suppose you decided to sell packs with aa cans in a pack with a discount and some customer wants to buy xx cans of cat food. Then he follows a greedy strategy:

  • he buys xa\left\lfloor \frac{x}{a} \right\rfloor packs with a discount;
  • then he wants to buy the remaining (xmoda)(x \bmod a) cans one by one.

xa\left\lfloor \frac{x}{a} \right\rfloor is xx divided by aa rounded down, xmodax \bmod a is the remainer of xx divided by aa.

But customers are greedy in general, so if the customer wants to buy (xmoda)(x \bmod a) cans one by one and it happens that (xmoda)a2(x \bmod a) \ge \frac{a}{2} he decides to buy the whole pack of aa cans (instead of buying (xmoda)(x \bmod a) cans). It makes you, as a marketer, happy since the customer bought more than he wanted initially.

You know that each of the customers that come to your shop can buy any number of cans from ll to rr inclusive. Can you choose such size of pack aa that each customer buys more cans than they wanted initially?

The first line contains a single integer tt (1t10001 \le t \le 1000) — the number of test cases.

The first and only line of each test case contains two integers ll and rr (1lr1091 \le l \le r \le 10^9) — the range of the number of cans customers can buy.

For each test case, print YES if you can choose such size of pack aa that each customer buys more cans than they wanted initially. Otherwise, print NO.

You can print each character in any case.

Input

The first line contains a single integer tt (1t10001 \le t \le 1000) — the number of test cases.

The first and only line of each test case contains two integers ll and rr (1lr1091 \le l \le r \le 10^9) — the range of the number of cans customers can buy.

Output

For each test case, print YES if you can choose such size of pack aa that each customer buys more cans than they wanted initially. Otherwise, print NO.

You can print each character in any case.

Samples

样例输入 1

3
3 4
1 2
120 150

样例输出 1

YES
NO
YES

Note

In the first test case, you can take, for example, a=5a = 5 as the size of the pack. Then if a customer wants to buy 33 cans, he'll buy 55 instead (3mod5=33 \bmod 5 = 3, 52=2.5\frac{5}{2} = 2.5). The one who wants 44 cans will also buy 55 cans.

In the second test case, there is no way to choose aa.

In the third test case, you can take, for example, a=80a = 80.