CF1257B.Magic Stick

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Recently Petya walked in the forest and found a magic stick.

Since Petya really likes numbers, the first thing he learned was spells for changing numbers. So far, he knows only two spells that can be applied to a positive integer:

  1. If the chosen number aa is even, then the spell will turn it into 3a2\frac{3a}{2} ;
  2. If the chosen number aa is greater than one, then the spell will turn it into a1a-1 .

Note that if the number is even and greater than one, then Petya can choose which spell to apply.

Petya now has only one number xx . He wants to know if his favorite number yy can be obtained from xx using the spells he knows. The spells can be used any number of times in any order. It is not required to use spells, Petya can leave xx as it is.

输入格式

The first line contains single integer TT ( 1T1041 \le T \le 10^4 ) — the number of test cases. Each test case consists of two lines.

The first line of each test case contains two integers xx and yy ( 1x,y1091 \le x, y \le 10^9 ) — the current number and the number that Petya wants to get.

输出格式

For the ii -th test case print the answer on it — YES if Petya can get the number yy from the number xx using known spells, and NO otherwise.

You may print every letter in any case you want (so, for example, the strings yEs, yes, Yes and YES will all be recognized as positive answer).

输入输出样例

  • 输入#1

    7
    2 3
    1 1
    3 6
    6 8
    1 2
    4 1
    31235 6578234
    

    输出#1

    YES
    YES
    NO
    YES
    NO
    YES
    YES
    
首页