#include <bits/stdc++.h>
using namespace std;
int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    long long int a, b;
    cin >> a >> b;
    if (abs(a - b) == 1) {
      cout << "No" << endl;
    } else {
      cout << "Yes" << endl;
    }
  }
}
