#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  while (T-- > 0) {
    int x, y;
    cin >> x >> y;
    if (x == 1) {
      if (y == 1) {
        cout << "YES\n";
      } else {
        cout << "NO\n";
      }
    } else if (x <= 3) {
      if (y <= 3) {
        cout << "YES\n";
      } else {
        cout << "NO\n";
      }
    } else {
      cout << "YES\n";
    }
  }
}
