#include #include #define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) using namespace atcoder; using namespace std; typedef long long ll; using mint = modint998244353; struct fraction { ll p, q; fraction(ll P = 0, ll Q = 1) : p(P), q(Q) {} bool operator<(const fraction &other) const { return p * other.q < other.p * q; } bool operator<=(const fraction &other) const { return p * other.q <= other.p * q; } bool operator>(const fraction &other) const { return p * other.q > other.p * q; } bool operator>=(const fraction &other) const { return p * other.q >= other.p * q; } bool operator==(const fraction &other) const { return p * other.q == other.p * q; } fraction operator+(const fraction &other) const { return fraction(p * other.q + other.p * q, q * other.q); } fraction operator-(const fraction &other) const { return fraction(p * other.q - other.p * q, q * other.q); } fraction operator*(const fraction &other) const { return fraction(p * other.p, q * other.q); } fraction operator/(const fraction &other) const { return fraction(p * other.q, q * other.p); } fraction operator+=(const fraction &other) { return *this = *this + other; } fraction operator-=(const fraction &other) { return *this = *this - other; } fraction operator*=(const fraction &other) { return *this = *this * other; } fraction operator/=(const fraction &other) { return *this = *this / other; } }; fraction input() { ll x, y; cin >> x >> y; fraction ret(y, x); return ret; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(12); int t; cin >> t; while (t--) { auto A = input(); auto B = input(); auto C = input(); bool ok = (A * B * C) == (C - A - B); int neg = (A.p < 0) + (B.p < 0) + (C.p < 0); ok &= (neg % 2 == 0); cout << (ok ? "Yes\n" : "No\n"); } }