#include <bits/stdc++.h>
#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
#include <numeric>
#include<string>
using ll = long long;
using namespace std;

int main()
{
    ll t, x, y;
    cin >> t;
    for (int i =0; i < t; i++){
        cin >> x >> y;
        cout << ((x < y && x <= 5) ? "No" : "Yes") << endl;
    }
}