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>
using namespace std;
struct point {
  double x, y;
  point(){};
  point(double _x, double _y) { x = _x, y = _y; }
};
bool ok[3];
int c = 0;
point get_point(point A, point B, point C) {
  double A1 = 2 * (B.x - A.x);
  double B1 = 2 * (B.y - A.y);
  double A2 = 2 * (C.x - B.x);
  double B2 = 2 * (C.y - B.y);
  double C1 = (B.x * B.x - A.x * A.x) + (B.y * B.y - A.y * A.y);
  double C2 = (C.x * C.x - B.x * B.x) + (C.y * C.y - B.y * B.y);
  double det = A1 * B2 - A2 * B1;
  if (fabs(det) < 1e-9) return point(-100000000, -100000000);
  double det1 = C1 * B2 - C2 * B1;
  double det2 = A1 * C2 - A2 * C1;
  double X = det1 / det;
  double Y = det2 / det;
  return point(X, Y);
}
bool ch(vector<point> res) {
  for (int i = 0; i < 4; i++)
    if ((fabs(res[i].x + 100000000) < 1e-9) &&
        (fabs(res[i].y + 100000000) < 1e-9))
      return 0;
  res.push_back(res[0]);
  res.push_back(res[1]);
  int ok = 1;
  for (int i = 0; i < 4; i++) {
    point A = point(res[i + 1].x - res[i].x, res[i + 1].y - res[i].y);
    point B = point(res[i + 2].x - res[i + 1].x, res[i + 2].y - res[i + 1].y);
    double tmp = B.x * A.y - B.y * A.x;
    if (tmp > 1e-9)
      ok = 1;
    else {
      ok = 0;
      break;
    }
  }
  return ok;
}
vector<point> solve(point P[3]) {
  point A;
  point B = point(P[1].x - P[2].x, P[1].y - P[2].y);
  A = point(P[1].x + B.x, P[1].y + B.y);
  vector<point> res;
  res.resize(4);
  res[1] = get_point(P[0], A, P[1]);
  B = point(P[0].x - res[1].x, P[0].y - res[1].y);
  res[0] = point(P[0].x + B.x, P[0].y + B.y);
  B = point(P[1].x - res[1].x, P[1].y - res[1].y);
  res[2] = point(P[1].x + B.x, P[1].y + B.y);
  B = point(P[2].x - res[2].x, P[2].y - res[2].y);
  res[3] = point(P[2].x + B.x, P[2].y + B.y);
  ok[c++] = ch(res);
  return res;
}
int main(void) {
  int t;
  scanf("%d", &t);
  while (t--) {
    point P[3], P1[3];
    vector<int> dg;
    for (int i = 0; i < 3; i++) dg.push_back(i);
    int x, y;
    for (int i = 0; i < 3; i++) {
      scanf("%d%d", &x, &y);
      P[i] = point(x, y);
    }
    vector<point> sq[6];
    int l = 0;
    do {
      for (int i = 0; i < 3; i++) P1[i] = P[dg[i]];
      sq[l] = solve(P1);
      l++;
    } while (next_permutation(dg.begin(), dg.end()));
    int r = 0;
    c = 0;
    for (int i = 0; i < 6; i++)
      if (ok[i]) {
        printf("YES\n");
        for (int j = 0; j < 4; j++)
          printf("%.9lf %.9lf%c", sq[i][j].x + 1e-10, sq[i][j].y + 1e-10,
                 (j < 3) ? ' ' : '\n');
        r = 1;
        break;
      }
    if (!r) printf("NO\n\n");
  }
  return 0;
}
