#include <bits/stdc++.h>
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma comment(linker, "/stack:200000000")
using namespace std;
void io() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int a, b;
    scanf("%d%d", &a, &b);
    if (a == 1) {
      if (b == 1)
        printf("YES\n");
      else
        printf("NO\n");
    } else if (a == 2 || a == 3) {
      if (b == 1 || b == 2 || b == 3)
        printf("YES\n");
      else
        printf("NO\n");
    } else
      printf("YES\n");
  }
  return 0;
}
