#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    long long int l, r;
    cin >> l >> r;
    (2 * l > r) ? cout << "YES\n" : cout << "NO\n";
  }
}
