#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  while (n--) {
    int l, r;
    scanf("%d %d", &l, &r);
    if (l >= (r + 1) / 2.0)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
