#include <bits/stdc++.h>
using namespace std;
int n, a, b;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a);
    scanf("%d", &b);
    if (a > 3) {
      cout << "YES\n";
    } else if (a == b) {
      cout << "YES\n";
    } else if ((a == 2 || a == 3) and b < 4) {
      cout << "YES\n";
    } else if (a == 1 and b == 1) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
