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