#include <iostream>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T;
cin >> T;
while(T--){
// Read grid dimensions, though they don't affect the answer as long as we stay in bounds.
long long N, M;
cin >> N >> M;
// Read starting position (x, y) and destination (p, q)
long long x, y, p, q;
cin >> x >> y;
cin >> p >> q;
// Check if the parity of the sum of coordinates is the same.
if ((x + y) % 2 == (p + q) % 2)
cout << "Yes" << "\n";
else
cout << "No" << "\n";
}
return 0;
}