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>
const double eps = 1e-10;
int T, X1, Y1, X2, Y2, X3, Y3;
double Cross(double X1, double Y1, double X2, double Y2, double X3, double Y3) {
  return (X1 - X2) * (Y3 - Y2) - (X3 - X2) * (Y1 - Y2);
}
bool Work(int X1, int Y1, int X2, int Y2, int X3, int Y3) {
  double a0 = 2 * (X1 - X2), b0 = 2 * (Y1 - Y2);
  double c0 = X2 * X2 - X1 * X1 + Y2 * Y2 - Y1 * Y1;
  double a1 = 2 * (X2 - X3), b1 = 2 * (Y2 - Y3);
  double c1 =
      -3 * (X2 * X2 + Y2 * Y2) - (X3 * X3 + Y3 * Y3) + 4 * (X2 * X3 + Y2 * Y3);
  double A0 = (c1 * b0 - c0 * b1) / (a0 * b1 - a1 * b0);
  double B0 = (a1 * c0 - a0 * c1) / (a0 * b1 - a1 * b0);
  double A1 = 2 * X2 - A0, B1 = 2 * Y2 - B0;
  double A2 = 2 * X3 - A1, B2 = 2 * Y3 - B1;
  double A3 = 2 * X1 - A0, B3 = 2 * Y1 - B0;
  double C0 = Cross(A0, B0, A1, B1, A2, B2);
  double C1 = Cross(A1, B1, A2, B2, A3, B3);
  double C2 = Cross(A2, B2, A3, B3, A0, B0);
  double C3 = Cross(A3, B3, A0, B0, A1, B1);
  if ((C0 < -eps && C1 < -eps && C2 < -eps && C3 < -eps) ||
      (C0 > eps && C1 > eps && C2 > eps && C3 > eps)) {
    printf("YES\n");
    printf("%.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf\n", A0, B0, A1, B1,
           A2, B2, A3, B3);
    return 1;
  }
  return 0;
}
int main() {
  for (scanf("%d", &T); T--;) {
    scanf("%d%d%d%d%d%d", &X1, &Y1, &X2, &Y2, &X3, &Y3);
    if (Work(X1, Y1, X2, Y2, X3, Y3)) continue;
    if (Work(X2, Y2, X3, Y3, X1, Y1)) continue;
    if (Work(X3, Y3, X1, Y1, X2, Y2)) continue;
    printf("NO\n\n");
  }
  return 0;
}