#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, i, s = 0, j;
  scanf("%lld", &a);
  for (i = 1; i <= a; i++) {
    scanf("%lld %lld", &b, &c);
    if (b == 1) {
      if (c == 1)
        printf("YES\n");
      else
        printf("NO\n");
    } else {
      if (b % 2 != 0) b = b - 1;
      if (b % 2 == 0) {
        for (j = 1; j <= 1000; j++) {
          if (b % 2 != 0) b = b - 1;
          b = (b * 3) / 2;
          if (b >= c) {
            s++;
            break;
          }
        }
      }
      if (s == 0)
        printf("NO\n");
      else
        printf("YES\n");
    }
    s = 0;
  }
  return 0;
}
