#include <bits/stdc++.h>
using namespace std;
const int OO = (int)1e9;
const double EPS = (1e-7);
vector<vector<long long> > v;
vector<long long> vis;
bool valid(int r, int c, int n, int m) {
  return (r >= 0 && r < n && c >= 0 && c < m);
}
int dx[] = {1, 0, -1, 0, -1, 1, -1, 1};
int dy[] = {0, 1, 0, -1, -1, 1, 1, -1};
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long l, r, d;
    cin >> l >> r;
    d = r + 1;
    double b = (double)d / 2.0;
    if ((l % d) >= (b) && (r % d) >= (b))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
