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;
struct rec {
  double x, y;
} a, b, c, d, e, A, B, C, D, za, zb, zc, zd;
int T;
double eps = 1e-10;
double mul(rec a, rec b, rec c) {
  return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
rec cross(rec a, rec b, rec c, rec d) {
  double t1 = mul(a, c, b), t2 = mul(a, b, d), t3 = mul(c, a, d),
         t4 = mul(c, d, b);
  rec e;
  e.x = (c.x * t2 + d.x * t1) / (t1 + t2),
  e.y = (c.y * t2 + d.y * t1) / (t1 + t2);
  return e;
}
void midch(rec a, rec b, rec &c, rec &d) {
  c.x = (a.x + b.x) / 2, c.y = (a.y + b.y) / 2;
  d.x = c.x + b.y - a.y, d.y = c.y + a.x - b.x;
}
bool solve(rec a, rec b, rec c) {
  midch(a, b, za, zb), midch(b, c, zc, zd);
  d.x = b.x + zd.x - zc.x, d.y = b.y + zd.y - zc.y;
  d = cross(b, d, za, zb);
  e = cross(za, zb, zc, zd);
  A.x = 2 * d.x - e.x, A.y = 2 * d.y - e.y;
  B.x = 2 * b.x - A.x, B.y = 2 * b.y - A.y;
  C.x = 2 * c.x - B.x, C.y = 2 * c.y - B.y;
  D.x = 2 * a.x - A.x, D.y = 2 * a.y - A.y;
  return mul(A, B, C) * mul(B, C, D) > eps &&
         mul(B, C, D) * mul(C, D, A) > eps && mul(C, D, A) * mul(D, A, B) > eps;
}
int main() {
  cin >> T;
  while (T--) {
    scanf("%lf%lf%lf%lf%lf%lf", &a.x, &a.y, &b.x, &b.y, &c.x, &c.y);
    if (fabs(mul(a, b, c)) > eps &&
        (solve(a, b, c) || solve(a, c, b) || solve(b, a, c)))
      puts("YES"), printf("%.9f %.9f %.9f %.9f %.9f %.9f %.9f %.9f\n", A.x, A.y,
                          B.x, B.y, C.x, C.y, D.x, D.y);
    else
      puts("NO\n");
  }
  return 0;
}