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