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 int Debug = 1;
using namespace std;
template <class T>
void ckmin(T &a, T b) {
  if (a > b) {
    a = b;
  }
}
template <class T>
void ckmax(T &a, T b) {
  if (a < b) {
    a = b;
  }
}
int countbit(int n) { return n == 0 ? 0 : 1 + countbit(n & (n - 1)); }
const int maxint = 0x7fffffff;
const long long max64 = 0x7fffffffffffffffll;
const int N = 8;
const double eps = 1e-9;
int dcmp(double x) { return (x > eps) - (x < -eps); }
struct point_t {
  double x, y;
  point_t() {}
  point_t(double a, double b) { x = a, y = b; }
  double len() { return sqrt(x * x + y * y); }
  point_t turnLeft() { return point_t(-y, x); }
  point_t turnRight() { return point_t(y, -x); }
} p[N];
point_t operator+(point_t a, point_t b) {
  return point_t(a.x + b.x, a.y + b.y);
}
point_t operator-(point_t a, point_t b) {
  return point_t(a.x - b.x, a.y - b.y);
}
point_t middle(point_t a, point_t b) {
  return point_t((a.x + b.x) / 2.0, (a.y + b.y) / 2.0);
}
double cross_mul(point_t a, point_t b) { return a.x * b.y - a.y * b.x; }
double dot_mul(point_t a, point_t b) { return a.x * b.x + a.y * b.y; }
point_t scale(point_t a, double fac) { return point_t(a.x * fac, a.y * fac); }
bool intersectLine(point_t s0, point_t s1, point_t t0, point_t t1, point_t &p) {
  point_t u = s1 - s0;
  point_t v = t1 - t0;
  point_t w = s0 - t0;
  if (0 == dcmp(dot_mul(u, v.turnLeft()))) {
    return false;
  }
  double s = -dot_mul(w, v.turnLeft()) / dot_mul(u, v.turnLeft());
  p = s0 + scale(u, s);
  return true;
}
bool proc(point_t a, point_t b, point_t c) {
  int i, j, k;
  point_t p[8], t;
  if (cross_mul(a - b, c - b) > 0) {
    swap(a, c);
  }
  t = middle(b, c) + b - c;
  if (!intersectLine(t, t + (b - c).turnLeft(), middle(a, b),
                     middle(a, b) + (a - b).turnLeft(), p[0])) {
    return false;
  }
  p[1] = a + a - p[0];
  p[3] = b + b - p[0];
  p[2] = c + c - p[3];
  p[4] = p[0];
  double tmp;
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 4; j++) {
      tmp = cross_mul(p[i + 1] - p[i], p[j] - p[i]);
      if (tmp > eps) {
        return false;
      }
      if (j != i && j != (i + 1) % 4 && tmp > -eps) {
        return false;
      }
    }
  }
  puts("YES");
  for (i = 0; i < 4; i++) {
    printf("%.9f %.9f ", p[i].x, p[i].y);
  }
  putchar(10);
  return true;
}
int main() {
  int i, j, k, testcase, a[3];
  scanf("%d", &testcase);
  while (testcase--) {
    for (i = 0; i < 3; i++) {
      a[i] = i;
      scanf("%lf %lf", &p[i].x, &p[i].y);
    }
    if (dcmp(cross_mul(p[1] - p[0], p[2] - p[0])) == 0) {
      puts("NO");
      continue;
    }
    int flag = true;
    do {
      if (proc(p[a[0]], p[a[1]], p[a[2]])) {
        flag = false;
        break;
      }
    } while (next_permutation(a, a + 3));
    if (flag) {
      puts("NO");
    }
  }
  return 0;
}