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>
int a, b, d, e, f, g, h, i, j;
struct node {
  double x, y;
  double A, B, C;
};
struct node K, L, M, MM, A, B, C, D, Center;
struct node ch;
struct node v[9], k[9];
int ee[9];
int ok, kk;
int T;
void In(struct node &x) { scanf("%lf%lf", &x.x, &x.y); }
double X(struct node x, struct node y) { return x.x * y.y - x.y * y.x; }
struct node DC(struct node x, struct node y) {
  int ii, jj, kk;
  struct node U;
  U.x = 2 * y.x - x.x;
  U.y = 2 * y.y - x.y;
  return U;
} struct node MID(struct node x, struct node y) {
  struct node D;
  D.x = (x.x + y.x) / 2.0;
  D.y = (x.y + y.y) / 2.0;
  return D;
} struct node JIE(struct node x, struct node y) {
  struct node u, v, w;
  if (fabs(x.x - y.x) < 1e-9) {
    u.A = 1;
    u.B = 0.0;
    return u;
  } else {
    u.A = -(y.y - x.y);
    u.B = y.x - x.x;
    return u;
  }
} struct node Jiao(struct node x, struct node y) {
  struct node D;
  double ii, jj, kk;
  struct node u, v, w, z;
  u.x = x.A;
  u.y = x.B;
  v.x = y.A;
  v.y = y.B;
  ii = X(u, v);
  u.x = x.A;
  u.y = -x.C;
  v.x = y.A;
  v.y = -y.C;
  jj = X(u, v);
  u.x = -x.C;
  u.y = x.B;
  v.x = -y.C;
  v.y = y.B;
  kk = X(u, v);
  if (fabs(ii) < 1e-9) {
    kk = 1;
    return D;
  }
  D.x = kk / ii;
  D.y = jj / ii;
  return D;
}
struct node Find(struct node x, struct node y, struct node z) {
  struct node M1, M2;
  struct node u, v, w;
  struct node D;
  M1 = MID(x, y);
  M2 = MID(x, z);
  u = JIE(x, y);
  v = JIE(x, z);
  M1.A = u.B;
  M1.B = -u.A;
  M1.C = -(M1.A * M1.x + M1.B * M1.y);
  M2.A = v.B;
  M2.B = -v.A;
  M2.C = -(M2.A * M2.x + M2.B * M2.y);
  kk = 0;
  D = Jiao(M1, M2);
  return D;
}
struct node Jian(struct node x, struct node y) {
  struct node D;
  D.x = x.x - y.x;
  D.y = x.y - y.y;
  return D;
}
int Tu() {
  double ii, jj, kk;
  struct node u, v, w;
  u = Jian(B, A);
  v = Jian(D, A);
  w = Jian(C, A);
  if (X(u, w) * X(v, w) > -1e-9) return 0;
  u = Jian(C, B);
  v = Jian(A, B);
  w = Jian(D, B);
  if (X(u, w) * X(v, w) > -1e-9) return 0;
  return 1;
}
void Print(struct node x) { printf("%.9lf %.9lf ", x.x, x.y); }
void Make() {
  int ii, jj, kk;
  if (ok) return;
  MM = DC(M, L);
  Center = Find(MM, K, L);
  if (kk == 1) return;
  B = Center;
  A = DC(B, K);
  C = DC(B, L);
  D = DC(C, M);
  if (Tu()) {
    printf("YES\n");
    Print(A);
    Print(B);
    Print(C);
    Print(D);
    printf("\n");
    ok++;
  }
}
void soso(int x) {
  int ii;
  if (ok == 0 && x == 3) {
    K = k[1];
    L = k[2];
    M = k[3];
    Make();
    return;
  }
  for (ii = 1; ii <= 3 && ok == 0; ii++)
    if (ee[ii] == 0) {
      k[x + 1] = v[ii];
      ee[ii] = 1;
      soso(x + 1);
      ee[ii] = 0;
    }
}
int G_line(struct node x, struct node y, struct node z) {
  if (fabs(x.x - y.x) <= 1e-9 && fabs(y.x - z.x) <= 1e-9)
    return 1;
  else if (fabs(x.x - y.x) <= 1e-9 || fabs(y.x - z.x) <= 1e-9 ||
           fabs(z.x - x.x) <= 1e-9)
    return 0;
  if (fabs((y.y - x.y) / (y.x - x.x) - (z.y - x.y) / (z.x - x.x)) <= 1e-9)
    return 1;
  return 0;
}
int main() {
  scanf("%d", &T);
  while (T--) {
    ok = 0;
    memset(ee, 0, sizeof(ee));
    In(v[1]);
    In(v[2]);
    In(v[3]);
    if (G_line(v[1], v[2], v[3])) {
      printf("NO\n\n");
      continue;
    }
    soso(0);
    if (ok == 0) printf("NO\n\n");
  }
  return 0;
}