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
#include <bits/stdc++.h>
const double zero = 1e-6;
bool line(double x1, double y1, double x2, double y2, double x3, double y3) {
  if (fabs(x1 - x2) < zero) {
    if (fabs(x2 - x3) < zero)
      return (true);
    else
      return (false);
  } else if (fabs(x2 - x3) < zero)
    return (false);
  else if (fabs((y3 - y2) / (x3 - x2) - (y2 - y1) / (x2 - x1)) < zero)
    return (true);
  else
    return (false);
}
bool side(double x1, double y1, double x2, double y2, double x3, double y3,
          double x4, double y4) {
  if (fabs(x1 - x2) < zero) {
    if ((x3 - x1) * (x4 - x1) > 0)
      return (true);
    else
      return (false);
  } else {
    double k = (y2 - y1) / (x2 - x1), b = y1 - k * x1;
    if ((k * x3 + b - y3) * (k * x4 + b - y4) > 0)
      return (true);
    else
      return (false);
  }
}
bool check(double x1, double y1, double x2, double y2, double x3, double y3,
           double x4, double y4) {
  if (line(x1, y1, x2, y2, x3, y3)) return (false);
  if (line(x2, y2, x3, y3, x4, y4)) return (false);
  if (line(x3, y3, x4, y4, x1, y1)) return (false);
  if (line(x4, y4, x1, y1, x2, y2)) return (false);
  if (!side(x1, y1, x2, y2, x3, y3, x4, y4)) return (false);
  if (!side(x2, y2, x3, y3, x1, y1, x4, y4)) return (false);
  if (side(x1, y1, x3, y3, x2, y2, x4, y4)) return (false);
  return (true);
}
bool work(double xa, double ya, double xb, double yb, double xc, double yc) {
  double a1 = 2 * (xa - xb), b1 = 2 * (ya - yb),
         c1 = xa * xa + ya * ya - xb * xb - yb * yb, a2 = 2 * (xc - xb),
         b2 = 2 * (yc - yb),
         c2 = 4 * xb * xc + 4 * yb * yc - 3 * xb * xb - 3 * yb * yb - xc * xc -
              yc * yc;
  double x1, y1, x2, y2, x3, y3, x4, y4;
  y1 = (a2 * c1 - a1 * c2) / (a2 * b1 - a1 * b2);
  if (fabs(a1) > zero)
    x1 = (c1 - b1 * y1) / a1;
  else
    x1 = (c2 - b2 * y1) / a2;
  x2 = 2 * xb - x1;
  y2 = 2 * yb - y1;
  x3 = 2 * xc - x2;
  y3 = 2 * yc - y2;
  x4 = 2 * xa - x1;
  y4 = 2 * ya - y1;
  if (check(x1, y1, x2, y2, x3, y3, x4, y4)) {
    printf("YES\n");
    printf("%.9f %.9f %.9f %.9f %.9f %.9f %.9f %.9f\n", x1, y1, x2, y2, x3, y3,
           x4, y4);
    return (true);
  } else
    return (false);
}
int main() {
  int t, i, xa, ya, xb, yb, xc, yc;
  double txa, tya, txb, tyb, txc, tyc;
  scanf("%d", &t);
  for (i = 1; i <= t; i++) {
    scanf("%d %d %d %d %d %d", &xa, &ya, &xb, &yb, &xc, &yc);
    txa = double(xa);
    tya = double(ya);
    txb = double(xb);
    tyb = double(yb);
    txc = double(xc);
    tyc = double(yc);
    if (!work(txa, tya, txb, tyb, txc, tyc))
      if (!work(txa, tya, txc, tyc, txb, tyb))
        if (!work(txb, tyb, txa, tya, txc, tyc)) printf("NO\n\n");
  }
  return (0);
}
