#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long l, r;
    cin >> l >> r;
    if (l > r / 2)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
