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