#include<bits/stdc++.h> using namespace std; int n,xa,xb,ya,yb; int main() { scanf("%d",&n); while(n--) { scanf("%d%d%d%d",&xa,&xb,&ya,&yb); if(__gcd(abs(xa-xb),abs(ya-yb))>1) printf("no\n"); else printf("yes\n"); } return 0; }