import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Mian {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
int n=fs.nextInt();
while(n-->0){
int x=fs.nextInt();
int y=fs.nextInt();
int a=fs.nextInt();
int b=fs.nextInt();
int A=Math.abs(x-a);
int B=Math.abs(y-b);
if(A==0||B==0){
if(A==0&&B==0){
System.out.println("no");
}else{
if(A>1||B>1){
System.out.println("yes");
}else{
System.out.println("no");
}
}
}else{
int z=gcd(Math.abs(x-a),Math.abs(y-b));
if(z!=1){
System.out.println("yes");
}else{
System.out.println("no");
}