#include "bits/stdc++.h" #ifdef WINT_MIN #define __MAI #endif using namespace std; typedef long long int ll; // 門松列の判定 inline bool kadomatu(double a, double b, double c) { return a != b&&b != c&&c != a && ((ab && c>b)); } bool solve(double x1, double x2, double x3, double y1, double y2, double y3) { // 時間0で🎍 if (kadomatu(x1, x2, x3)) return true; // 十分な時間経過で🎍 if (kadomatu(y1, y2, y3)) return true; for (double t = 0.0; t < 100; t+=0.001) { // 時刻tで🎍かどうか調べる if (kadomatu(x1 + y1*t, x2 + y2*t, x3 + y3*t)) { return true; } } return false; } int main() { int n; double x1, x2, x3, y1, y2, y3; cin >> n; for (int i = 0; i < n; ++i) { cin >> x1 >> x2 >> x3 >> y1 >> y2 >> y3; if (solve(x1, x2, x3, y1, y2, y3)) { cout << "YES" << endl; } else { cout << "NO" << endl; } } return 0; }