#include using namespace std; using ll = long long; const ll mod = 1e9 + 7; const int N = 200005; const int INF = 0x3f3f3f3f; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int _; cin >> _; while (_--) { ll ax, ay, bx, by, cx, cy; cin >> ax >> ay >> bx >> by >> cx >> cy; bool ok = 0; if (ay == 0 && by == 0) { if (cy == 0 && cx > 0) ok = 1; } else { __int128 x = ((__int128)ax * bx - ((__int128)ay * by)); __int128 y = ((__int128)ay * bx + ((__int128)by * ax)); if (x == 0) { if (cx == 0 && cy > 0) ok = 1; } else { if (y * cx == (__int128)cy * x) ok = 1; } } if (ok) { cout << "Yes\n"; } else { cout << "No\n"; } } return 0; }