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