#include <bits/stdc++.h>
using namespace std;
const long long mod = (long long)1e9 + 7;
const int INF = 0x3f3f3f3f;
const int MAXN = (int)1e4 + 10;
char s[MAXN], t[MAXN];
int main() {
  int T;
  cin >> T;
  while (T--) {
    int x, y;
    cin >> x >> y;
    bool flag = true;
    if (x == 1) {
      if (y != 1) flag = false;
    } else if (x == 2) {
      if (y != 1 && y != 2 && y != 3) flag = false;
    } else if (x == 3) {
      if (y != 1 && y != 2 && y != 3) flag = false;
    }
    if (flag) {
      puts("YES");
    } else {
      puts("NO");
    }
  }
  return 0;
}
