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