#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int x, y;
    cin >> x >> y;
    if (x == 1 && y == 1)
      cout << "yes" << endl;
    else if (x == 1 && y != 1)
      cout << "no" << endl;
    else if ((x == 2 && y == 3) || (x == 2 && y == 1) || (x == 3 && y == 2) ||
             (x == 2 && y == 2) || (x == 3 && y == 3) || (x == 3 && y == 1))
      cout << "yes" << endl;
    else if ((x == 2 && y != 3) || (x == 2 && y != 1) || (x == 3 && y != 2) ||
             (x == 2 && y != 2) || (x == 3 && y != 3) || (x == 3 && y != 1))
      cout << "no" << endl;
    else
      cout << "yes" << endl;
  }
  return 0;
}
