#include <iostream>
#include <cmath>
using namespace std;
int gcd(int a, int b)
{
if (a % b == 0)
return b;
else
return gcd(b, a % b);
}
int main()
{
int n;
cin >> n;
while (n--)
{
int ax, ay, bx, by;
cin >> ax >> ay >> bx >> by;
if ((ax == bx) || (ay == by))//坑2:特判
{
if (((bx - ax) + (by - ay)) > 1)
cout << "yes" << endl;
else
cout << "no" << endl;
continue;
}
if (gcd(abs(bx - ax), abs(by - ay)) == 1)//坑1:绝对值
cout << "no" << endl;
else
cout << "yes" << endl;
}
return 0;
}