#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int l, r;
    cin >> l >> r;
    int h = max(2 * l, r + 1);
    if ((l % h) >= ((h + 1) / 2))
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
