#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    int a, b;
    cin >> a >> b;
    if (b / 2 < a) {
      cout << "YES\n";
    } else
      cout << "NO\n";
  }
}
