#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:10000000000")
using namespace std;
template <typename T>
ostream& operator<<(ostream& o, vector<T> x) {
  for (auto it : x) o << it << ' ';
  return o;
}
template <typename T>
istream& operator>>(istream& i, vector<T>& x) {
  for (auto& it : x) i >> it;
  return i;
}
template <typename T>
void chkmin(T& a, T& b) {
  a > b ? a = b : 0;
}
template <typename T>
void chkmax(T& a, T& b) {
  a < b ? a = b : 0;
}
const long long INF = 1000000007;
const long long INF2 = 100000000000000007;
const long long miniINF = 1e15;
const long long MOD = 1172113087;
const long long MOD1 = 1000000007;
const long long SIZE = 200010;
const long long base = 53;
const long double eps = 1e-6;
const double pi = acos(-1.0);
long long q, n, ar[SIZE], a, b, c, d, v, v1, k, m;
string s, t;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> q;
  while (q--) {
    cin >> a >> b;
    if (a * 2 > b)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
