#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long double PI = acos(-1);
const long double EPS = 1e-9;
const long long INF = 1e18;
long long power(long long a, long long b) {
  long long res = 1;
  a %= 1000000007;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % 1000000007;
    a = a * a % 1000000007;
  }
  return res;
}
void c_p_c() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long modFact(long long n, long long p) {
  if (n >= p) return 0;
  long long result = 1;
  for (long long i = 1; i <= n; i++) result = (result * i) % p;
  return result;
}
void solve() {
  long long l, r;
  cin >> l >> r;
  if (2 * l > r)
    cout << "YES";
  else
    cout << "NO";
  return;
}
int32_t main() {
  c_p_c();
  long long TC = 1, t = 0;
  cin >> TC;
  while (t++ < TC) {
    solve();
    cout << '\n';
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
