#include #include #include #include #include #include using namespace std; using namespace atcoder; using ll = long long; using mint = modint998244353; using vi = vector; using vvi = vector; using vvvi = vector; using vll = vector; using vvll = vector; using vvvll = vector; using vmi = vector; using vvmi = vector; using vvvmi = vector; #define all(a) (a).begin(), (a).end() #define rep2(i, m, n) for (int i = (m); i < (n); ++i) #define rep(i, n) rep2(i, 0, n) #define drep2(i, m, n) for (int i = (m)-1; i >= (n); --i) #define drep(i, n) drep2(i, n, 0) void solve(){ ll ax, ay, bx, by, cx, cy; cin >> ax >> ay >> bx >> by >> cx >> cy; if(ax == 0 && bx == 0){ cout << ((cy == 0 && cx < 0) ? "Yes" : "No") << endl; return; } if(bx == 0){ swap(ax, bx); swap(ay, by); } if(ax == 0){ if(by == 0){ cout << (cx == 0 ? "Yes" : "No") << endl; }else{ if(cx == 0){ cout << "No" << endl; }else{ cout << (cx*bx + cy*by == 0 ? "Yes" : "No") << endl; } } return; } if(cx == 0){ cout << (ax*bx == ay*by ? "Yes" : "No") << endl; return; } if(ax*bx == ay*by){ cout << (cx == 0 ? "Yes" : "No") << endl; return ; } if(cy == 0 && cx < 0){ cout << "No" << endl; return; } cout << ((cy*(ax*bx - ay*by) == cx*(ay*bx + ax*by)) ? "Yes" : "No") << endl; } int main(){ int t; cin >> t; while(t--)solve(); return 0; }