Problem: You're given the centers of three equal sides of a strictly convex tetragon. Your task is to restore the initial tetragon.

Input

The first input line contains one number T — amount of tests (1 ≤ T ≤ 5·104). Each of the following T lines contains numbers x1, y1, x2, y2, x3, y3 — coordinates of different points that are the centers of three equal sides (non-negative integer numbers, not exceeding 10).

Output

For each test output two lines. If the required tetragon exists, output in the first line YES, in the second line — four pairs of numbers — coordinates of the polygon's vertices in clockwise or counter-clockwise order. Don't forget, please, that the tetragon should be strictly convex, i.e. no 3 of its points lie on one line. Output numbers with 9 characters after a decimal point.

If the required tetragon doen't exist, output NO in the first line, and leave the second line empty.

Examples

Input

3
1 1 2 2 3 3
0 1 1 0 2 2
9 3 7 9 9 8


Output

NO

YES
3.5 1.5 0.5 2.5 -0.5 -0.5 2.5 0.5
NO

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
void Get(int &T) {
  char C;
  bool F = 0;
  for (; C = getchar(), C < '0' || C > '9';)
    if (C == '-') F = 1;
  for (T = C - '0'; C = getchar(), C >= '0' && C <= '9'; T = T * 10 + C - '0')
    F && (T = -T);
  F && (T = -T);
}
int Cp(int X1, int Y1, int X2, int Y2) { return X1 * Y2 - X2 * Y1; }
double Cp(double X1, double Y1, double X2, double Y2) {
  return X1 * Y2 - X2 * Y1;
}
void Cross(double &X1, double &Y1, double &X2, double &Y2, double &X3,
           double &Y3, double &X4, double &Y4, double &X, double &Y) {
  double Cp1 = Cp(X2 - X1, Y2 - Y1, X3 - X1, Y3 - Y1);
  double Cp2 = Cp(X2 - X1, Y2 - Y1, X4 - X1, Y4 - Y1);
  double K = Cp1 / (Cp1 - Cp2);
  X = X3 + (X4 - X3) * K;
  Y = Y3 + (Y4 - Y3) * K;
}
double Abs(double X) { return X > 0 ? X : -X; }
bool Calc(int X1, int Y1, int X2, int Y2, int X3, int Y3) {
  if (Cp(X1 - X2, Y1 - Y2, X1 - X3, Y1 - Y3) == 0) {
    return 0;
  }
  int X4, Y4;
  X4 = X1 + X3 - X2;
  Y4 = Y1 + Y3 - Y2;
  double Ax = (X1 + X2) * 0.5;
  double Ay = (Y1 + Y2) * 0.5;
  double Bx = Ax + (Y1 - Y2);
  double By = Ay - (X1 - X2);
  double Cx = (X2 + X3) * 0.5;
  double Cy = (Y2 + Y3) * 0.5;
  double Dx = Cx + (Y2 - Y3);
  double Dy = Cy - (X2 - X3);
  Cx = X2 + X2 - Cx;
  Cy = Y2 + Y2 - Cy;
  Dx = X2 + X2 - Dx;
  Dy = Y2 + Y2 - Dy;
  double x1, y1;
  Cross(Ax, Ay, Bx, By, Cx, Cy, Dx, Dy, x1, y1);
  double x2 = X2 + X2 - x1;
  double y2 = Y2 + Y2 - y1;
  double x3 = X3 + X3 - x2;
  double y3 = Y3 + Y3 - y2;
  double x4 = X4 + X4 - x3;
  double y4 = Y4 + Y4 - y3;
  double Cp1 = Cp(x2 - x1, y2 - y1, x3 - x1, y3 - y1);
  double Cp2 = Cp(x3 - x2, y3 - y2, x4 - x2, y4 - y2);
  double Cp3 = Cp(x4 - x3, y4 - y3, x1 - x3, y1 - y3);
  double Cp4 = Cp(x1 - x4, y1 - y4, x2 - x4, y2 - y4);
  if (Abs(Cp1) < 1e-8) return 0;
  if (Abs(Cp2) < 1e-8) return 0;
  if (Abs(Cp3) < 1e-8) return 0;
  if (Abs(Cp4) < 1e-8) return 0;
  if ((Cp1 > 0 && Cp2 > 0 && Cp3 > 0 && Cp4 > 0) ||
      (Cp1 < 0 && Cp2 < 0 && Cp3 < 0 && Cp4 < 0)) {
    puts("YES");
    printf("%.15lf %.15lf ", x1, y1);
    printf("%.15lf %.15lf ", x2, y2);
    printf("%.15lf %.15lf ", x3, y3);
    printf("%.15lf %.15lf\n", x4, y4);
    return 1;
  }
  return 0;
}
int X1, Y1, X2, Y2, X3, Y3;
void Init() {
  Get(X1), Get(Y1);
  Get(X2), Get(Y2);
  Get(X3), Get(Y3);
}
void Work() {
  if (Calc(X1, Y1, X2, Y2, X3, Y3)) return;
  if (Calc(X2, Y2, X3, Y3, X1, Y1)) return;
  if (Calc(X3, Y3, X1, Y1, X2, Y2)) return;
  puts("NO\n");
}
int main() {
  int Case;
  Get(Case);
  for (int i = 1; i <= Case; i++) {
    Init();
    Work();
  }
  return 0;
}