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>
typedef struct {
  double x;
  double y;
} pt;
int T;
bool on_line(pt a, pt b, pt c) {
  double cross_product = (a.x - b.x) * (a.y - c.y) - (a.x - c.x) * (a.y - b.y);
  if (cross_product < 1e-7 && cross_product > -1e-7) {
    return true;
  } else {
    return false;
  }
}
pt circumcenter(pt a, pt b, pt c) {
  double A[2], B[2], C[2];
  A[0] = b.x - a.x;
  B[0] = b.y - a.y;
  C[0] = b.x * (b.x - a.x) + b.y * (b.y - a.y);
  A[1] = c.x - a.x;
  B[1] = c.y - a.y;
  C[1] = c.x * (c.x - a.x) + c.y * (c.y - a.y);
  pt o;
  o.x = (C[0] * B[1] - C[1] * B[0]) / (A[0] * B[1] - A[1] * B[0]);
  o.y = (A[0] * C[1] - A[1] * C[0]) / (A[0] * B[1] - A[1] * B[0]);
  o.x = (o.x + a.x) / 2;
  o.y = (o.y + a.y) / 2;
  return o;
}
bool is_convex(pt p[4]) {
  bool pos = true;
  bool neg = true;
  for (int i = 0; i < 4; i++) {
    double cp =
        (p[(i + 1) % 4].x - p[i].x) * (p[(i + 1) % 4].y - p[(i + 2) % 4].y) -
        (p[(i + 1) % 4].x - p[(i + 2) % 4].x) * (p[(i + 1) % 4].y - p[i].y);
    if (cp < 1e-7 && cp > -1e-7) return false;
    if (cp > 0) neg = false;
    if (cp < 0) pos = false;
  }
  if (pos || neg) return true;
  return false;
}
void works(pt p[3]) {
  if (on_line(p[0], p[1], p[2])) {
    printf("NO\n\n");
    return;
  }
  for (int i = 0; i < 3; i++) {
    pt quad[4], a, b;
    a.x = 2 * p[i].x - p[(i + 1) % 3].x;
    a.y = 2 * p[i].y - p[(i + 1) % 3].y;
    b.x = 2 * p[i].x - p[(i + 2) % 3].x;
    b.y = 2 * p[i].y - p[(i + 2) % 3].y;
    quad[1] = circumcenter(a, p[i], p[(i + 2) % 3]);
    quad[2] = circumcenter(b, p[i], p[(i + 1) % 3]);
    quad[0].x = 2 * p[(i + 2) % 3].x - quad[1].x;
    quad[0].y = 2 * p[(i + 2) % 3].y - quad[1].y;
    quad[3].x = 2 * p[(i + 1) % 3].x - quad[2].x;
    quad[3].y = 2 * p[(i + 1) % 3].y - quad[2].y;
    if (is_convex(quad)) {
      printf("YES\n");
      for (int i = 0; i < 4; i++) {
        printf("%.9f %.9f", quad[i].x, quad[i].y);
        if (i != 3) {
          printf(" ");
        } else {
          printf("\n");
        }
      }
      return;
    }
  }
  printf("NO\n\n");
}
int main() {
  scanf("%d", &T);
  for (int i = 0; i < T; i++) {
    pt mid[3];
    for (int j = 0; j < 3; j++) {
      int a, b;
      scanf("%d %d", &a, &b);
      mid[j].x = a;
      mid[j].y = b;
    }
    works(mid);
  }
  return 0;
}
