#include <bits/stdc++.h>
using namespace std;
int t;
void solve() {
  cin >> t;
  while (t--) {
    int x, y, l, r, o = 0;
    cin >> l >> r;
    y = l * 2 / 3;
    x = r / 2 + 1;
    for (int i = x; i <= y; i++) {
      cout << "YES" << endl;
      o = 1;
      break;
    }
    if (o == 0 && r <= 2 * l - 1) {
      cout << "YES" << endl;
      o = 1;
    }
    if (o == 0) cout << "NO" << endl;
  }
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false), cin.tie(0);
  for (i = 0; i < (argc - 1); i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < (s.size()); i++) ungetc(s[s.size() - 1 - i], stdin);
  cout.tie(0);
  solve();
  return 0;
}
