#include <bits/stdc++.h>
int main() {
  int t, m;
  scanf("%d", &t);
  m = t - 1;
  int arr[t];
  while (t--) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (x >= y)
      arr[t] = 1;
    else {
      if (x % 2 == 0) {
        if (x >= 4)
          arr[t] = 1;
        else if (x == 2) {
          if (y == 3)
            arr[t] = 1;
          else
            arr[t] = 0;
        }
      } else {
        if (x == 1 || x == 3)
          arr[t] = 0;
        else
          arr[t] = 1;
      }
    }
  }
  for (int i = m; i >= 0; i--) {
    if (arr[i] == 1)
      printf("%s\n", "YES");
    else
      printf("%s\n", "NO");
  }
  return 0;
}
