#include using namespace std; typedef long long ll; struct vec { ll x, y; vec(ll x_, ll y_) : x(x_), y(y_) {} vec() : x(0), y(0) {} vec operator-() { return vec(-x, -y); } vec operator+=(vec rhs) { x += rhs.x; y += rhs.y; return *this; } vec operator-=(vec rhs) { x -= rhs.x; y -= rhs.y; return *this; } vec operator*=(ll rhs) { x *= rhs; y *= rhs; return *this; } vec operator+(vec rhs) { return vec(*this) += rhs; } vec operator-(vec rhs) { return vec(*this) -= rhs; } vec operator*(ll rhs) { return vec(*this) *= rhs; } bool operator==(vec rhs) { return x == rhs.x && y == rhs.y; } bool operator!=(vec rhs) { return !(*this == rhs); } ll dot(vec rhs) const { return x * rhs.x + y * rhs.y; } ll cross(vec rhs) const { return x * rhs.y - y * rhs.x; } ll norm2() const { return x * x + y * y; }; double norm() const { return sqrt((*this).norm2()); }; void print() { cout << x << " " << y << endl; } }; int main() { int tt; cin >> tt; while (tt--) { vector p(3); for (int i = 0; i < 3; i++) { cin >> p[i].x >> p[i].y; } vec d(p[0].x * p[1].x - p[0].y * p[1].y, p[0].x * p[1].y + p[0].y * p[1].x); if (d.cross(p[2]) == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } } return 0; }