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