#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    int l, r;
    cin >> l >> r;
    if (l > (r / 2))
      cout << "YES";
    else
      cout << "NO";
    cout << "\n";
  }
  return 0;
}
