2021-11-19 09:01:13 +00:00
|
|
|
#include <bits/stdc++.h>
|
2020-10-25 13:48:03 +00:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
int gcd(int a, int b) {
|
2021-11-19 09:01:13 +00:00
|
|
|
if (b == 0) {
|
2020-10-25 13:48:03 +00:00
|
|
|
return a;
|
|
|
|
}
|
2021-11-19 09:01:13 +00:00
|
|
|
return gcd(b, a % b);
|
2020-10-25 13:48:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
int t;
|
|
|
|
cin >> t;
|
2021-11-19 09:01:13 +00:00
|
|
|
while (t--) {
|
2020-10-25 13:48:03 +00:00
|
|
|
int ax, ay, bx, by;
|
|
|
|
cin >> ax >> ay >> bx >> by;
|
2021-11-19 09:01:13 +00:00
|
|
|
cout << (gcd(abs(ax - bx), abs(ay - by)) == 1 ? "no" : "yes") << endl;
|
2020-10-25 13:48:03 +00:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|