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;
double fRand(double fMin, double fMax) {
  double f = (double)rand() / RAND_MAX;
  return fMin + f * (fMax - fMin);
}
template <class T>
T min(T a, T b, T c) {
  return min(a, min(b, c));
}
template <class T>
T max(T a, T b, T c) {
  return max(a, max(b, c));
}
const double PI = acos(-1.0);
const double EPS = 1e-9;
struct pt {
  double x, y;
  void read() { scanf("%lf%lf", &x, &y); }
  pt operator+(pt p) { return {x + p.x, y + p.y}; }
  pt operator-(pt p) { return {x - p.x, y - p.y}; }
  pt operator*(double k) { return {x * k, y * k}; }
  pt operator/(double k) { return {x / k, y / k}; }
  double operator*(pt p) { return x * p.y - y * p.x; }
  void print() { printf("(%.15g, %.15g)\n", x, y); }
};
int orient(pt &a, pt &b, pt &c) {
  double x = (c - a) * (b - a);
  return (x > EPS) - (x < -EPS);
}
int mag(pt p) { return p.x * p.x + p.y * p.y; }
pt perp(pt p) { return {-p.y, p.x}; }
struct line {
  pt v;
  double c;
  line(pt p, pt q) : v(q - p), c(v * p) {}
};
line perpThrough(pt v, pt p) { return {p, p + perp(v)}; }
line parThrough(pt v, pt p) { return {p, p + v}; }
line perpBisec(pt a, pt b) { return perpThrough(b - a, (b + a) / 2); }
bool isConvex(pt p[]) {
  int sign[4];
  for (int i = (0); i <= (3); ++i) {
    sign[i] = orient(p[i], p[(i + 1) % 4], p[(i + 2) % 4]);
    if (sign[0] == 0 || sign[i] != sign[0]) return false;
  }
}
bool inter(line l1, line l2, pt &out) {
  double x = l1.v * l2.v;
  if (abs(x) < EPS) return false;
  out = (l2.v * l1.c - l1.v * l2.c) / x;
  return true;
}
bool getTetragon(pt m, pt n, pt p, pt out[]) {
  line bisecMN = perpBisec(m, n), bisecNP = perpBisec(n, p);
  pt o;
  if (!inter(bisecMN, bisecNP, o)) return false;
  line nb = perpThrough(n - m, n);
  pt b;
  inter(nb, bisecNP, b);
  line nc = perpThrough(p - n, n);
  pt c;
  inter(nc, bisecMN, c);
  line de = parThrough(c - b, n);
  inter(de, bisecMN, out[1]);
  inter(de, bisecNP, out[2]);
  out[0] = m * 2 - out[1];
  out[3] = p * 2 - out[2];
  return isConvex(out);
}
int nTest;
pt c[3];
void Solve() {
  pt p[4];
  for (int i = (0); i <= (2); ++i) {
    if (getTetragon(c[i], c[(i + 1) % 3], c[(i + 2) % 3], p)) {
      puts("YES");
      for (int i = (0); i <= (3); ++i) printf("%.15g %.15g ", p[i].x, p[i].y);
      puts("");
      return;
    }
  }
  puts("NO");
  puts("");
}
int main() {
  scanf("%d", &nTest);
  for (int iTest = (1); iTest <= (nTest); ++iTest) {
    for (int i = (0); i <= (2); ++i) c[i].read();
    Solve();
  }
  return 0;
}
