#include <bits/stdc++.h>
using namespace std;
int xx[8] = {0, 0, 1, -1, 1, -1, 1, -1};
int yy[8] = {-1, 1, 0, 0, 1, -1, -1, 1};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n;
  cin >> n;
  while (n--) {
    long double l, r;
    cin >> l >> r;
    long double x = (r + 1) / 2;
    if (l < x)
      cout << "NO"
           << "\n";
    else
      cout << "YES"
           << "\n";
  }
  return 0;
}
