#include <bits/stdc++.h>   using namespace std;   const double eps = 1e-10;   struct point {     double x, y;   };   struct segment {     double a, b, c;   };   point operator+(point a, point b) { return (point){a.x + b.x, a.y + b.y}; }   point operator-(point a, point b) { return (point){a.x - b.x, a.y - b.y}; }   double operator*(point a, point b) { return a.x * b.x + a.y * b.y; }   double operator/(point a, point b) { return a.x * b.y - a.y * b.x; }   point operator*(point a, double b) { return (point){a.x * b, a.y * b}; }   point operator/(point a, double b) { return (point){a.x / b, a.y / b}; }   int T;   point I, J, K, L;   segment midline(point A, double a, double b) {     segment line;     line.a = b;     line.b = -a;     line.c = -(A.x * line.a + A.y * line.b);     return line;   }   point getpoint(segment A, segment B) {     point C;     C.x = (-A.c * B.b + B.c * A.b) / (A.a * B.b - B.a * A.b);     C.y = (-A.a * B.c + B.a * A.c) / (A.a * B.b - B.a * A.b);     return C;   }   point mirror(point A, point B) {     point C;     C = A + (B - A) * 2;     return C;   }   int zero1(double x) { return x > eps; }   int zero0(double x) { return x < -eps; }   int solve(point A, point B, point C) {     point D, E, F, G, H;     point IJ, JK, KL, LI;     segment lineAC, lineBC, lineD, lineE, lineHG;     bool ans;     ans = false;     lineAC = (segment){A.y - C.y, C.x - A.x, A / C};     lineBC = (segment){B.y - C.y, C.x - B.x, B / C};     D = (A + C) / 2;     E = (B + C) / 2;     lineD = midline(D, lineAC.a, lineAC.b);     lineE = midline(E, lineBC.a, lineBC.b);     F = getpoint(lineD, lineE);     G = mirror(E, C);     H = mirror(F, C);     lineHG = (segment){H.y - G.y, G.x - H.x, H / G};     I = getpoint(lineHG, lineD);     J = mirror(I, C);     K = mirror(J, B);     L = mirror(I, A);     IJ = J - I;     JK = K - J;     KL = L - K;     LI = I - L;     if (zero1(IJ / JK) && zero1(JK / KL) && zero1(KL / LI) && zero1(LI / IJ))       ans = true;     if (zero0(IJ / JK) && zero0(JK / KL) && zero0(KL / LI) && zero0(LI / IJ))       ans = true;     return ans;   }   void print() {     printf( YES n%.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf n , I.x, I.y,            J.x, J.y, K.x, K.y, L.x, L.y);   }   int main() {     point A, B, C;     scanf( %d , &T);     while (T--) {       scanf( %lf%lf%lf%lf%lf%lf , &A.x, &A.y, &B.x, &B.y, &C.x, &C.y);       if (solve(A, B, C))         print();       else if (solve(A, C, B))         print();       else if (solve(B, C, A))         print();       else         printf( NO n );     }     return 0;   }   