0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-27 09:51:59 +00:00
OI-codes/Luogu/P1170/P1170.cpp

22 lines
365 B
C++
Raw Normal View History

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;
}