#include <bits/stdc++.h>
using namespace std;
int chk(int l, int r) {
  int a = 2 * l;
  return r < a;
}
int main() {
  int T;
  cin >> T;
  while (T--) {
    int l, r;
    cin >> l >> r;
    puts(chk(l, r) ? "YES" : "NO");
  }
}
