#include <bits/stdc++.h>
using namespace std;
long long int l, r;
void solve() {
  cin >> l >> r;
  if (l >= ceil((r + 1) / 2.0))
    cout << "YES";
  else {
    cout << "NO";
  }
}
int32_t main() {
  {
    ios_base ::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
  };
  long long int t = 1;
  cin >> t;
  while (t--) {
    solve();
    cout << "\n";
  }
  return 0;
}
