#include <iostream>
using namespace std;
int main() {
int T;
cin >> T;
while (T--) {
int N, M;
cin >> N >> M;
// Check if it's possible for the tournament to be interesting
if (N <= 1 || M < N - 1) {
cout << "NO" << endl;
} else {
cout << "YES" << endl;
}
}
return 0;
}
Leave a Reply