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>
using namespace std;
int64_t d2i(double d) {
  union {
    double d;
    int64_t i;
  } t;
  t.d = d;
  if (t.i == 1ll << 63)
    t.i = -1;
  else if (t.i < 0) {
    t.i = ~t.i;
    t.i |= 1ll << 63;
    assert(t.i < 0);
  }
  return t.i;
}
int sgn(double x, double y = 0) {
  return fabs(x - y) < 1e-8 ? 0 : x > y ? 1 : -1;
}
struct P {
  double x = 0, y = 0;
  P() {}
  P(double x, double y) : x(x), y(y) {}
  P operator+(const P &q) const { return P(x + q.x, y + q.y); }
  P operator-(const P &q) const { return P(x - q.x, y - q.y); }
  double operator*(const P &q) const { return x * q.x + y * q.y; }
  int operator%(const P &q) const { return sgn(x * q.y, y * q.x); }
  P operator*(double f) const { return P(x * f, y * f); }
  P operator/(double f) const { return P(x / f, y / f); }
  friend ostream &operator<<(ostream &o, const P &p) {
    return o << "(" << p.x << ", " << p.y << ")";
  }
};
int crs(const P &o, const P &a, const P &b) { return (a - o) % (b - o); }
struct L {
  double a = 0, b = 0, c = 0;
  L() {}
  L(double a, double b, double c) : a(a), b(b), c(c) {}
  L(const P &p, const P &q)
      : a(q.y - p.y), b(p.x - q.x), c(-a * p.x - b * p.y) {}
  double test(const P &p) const { return p * P(a, b) + c; }
};
P solve(const L &f, const L &g) {
  double d = f.a * g.b - f.b * g.a;
  return P(f.b * g.c - f.c * g.b, f.c * g.a - f.a * g.c) / d;
}
L zcx(const P &a, const P &b) {
  P p = (a + b) * .5;
  P q = b - a;
  swap(q.x, q.y);
  q.y = -q.y;
  return L(p, p + q);
}
int main() {
  int T;
  for (scanf("%d", &T); T--;) {
    P in[3];
    for (int i = 0; i < 3; ++i) {
      int x, y;
      scanf("%d%d", &x, &y);
      in[i].x = x;
      in[i].y = y;
    }
    if (crs(in[0], in[1], in[2]) == 0) {
      puts("NO\n");
      continue;
    }
    int o[3] = {0, 1, 2};
    bool ans = false;
    do {
      P a = in[o[0]], b = in[o[1]], c = in[o[2]];
      P p = solve(zcx(b + b - a, b), zcx(c, b));
      P q = solve(zcx(a, b), zcx(b + b - c, b));
      P s = c + c - p;
      P t = a + a - q;
      if (crs(s, p, q) > 0 && crs(p, q, t) > 0 && crs(q, t, s) > 0 &&
          crs(t, s, p) > 0) {
        ans = true;
        puts("YES");
        printf("%.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf \n", s.x, s.y,
               p.x, p.y, q.x, q.y, t.x, t.y);
        break;
      }
    } while (next_permutation(o, o + 3));
    if (!ans) puts("NO\n");
  }
  return 0;
}