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