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;
template <class T>
inline void R(T &xx) {
  xx = 0;
  char ch = getchar();
  bool F = 0;
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') F = 1, ch = getchar();
  while (ch >= '0' && ch <= '9')
    xx = xx + xx + (xx << 3) + ch - 48, ch = getchar();
  if (F) xx = -xx;
}
template <class T>
inline void add(int &x, T y) {
  for (x += y; x >= 51123987; x -= 51123987)
    ;
}
const double eps = 1e-8;
struct nod {
  double x, y;
} a, b, c, d, e, A, B, C, D, za, zb, zc, zd;
inline double mul(nod a, nod b, nod c) {
  return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
inline nod cross(nod a, nod b, nod c, nod d) {
  double t1 = mul(a, c, b), t2 = mul(a, b, d), t3 = mul(c, a, d),
         t4 = mul(c, d, b);
  nod e;
  e.x = (c.x * t2 + d.x * t1) / (t1 + t2),
  e.y = (c.y * t2 + d.y * t1) / (t1 + t2);
  return e;
}
inline void midch(nod a, nod b, nod &c, nod &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 che(nod a, nod b, nod c) {
  midch(a, b, za, zb), midch(b, c, zc, zd);
  d = (nod){b.x + zd.x - zc.x, b.y + zd.y - zc.y};
  d = cross(b, d, za, zb);
  e = cross(za, zb, zc, zd);
  A = (nod){2. * d.x - e.x, 2. * d.y - e.y};
  B = (nod){2. * b.x - A.x, 2. * b.y - A.y};
  C = (nod){2. * c.x - B.x, 2. * c.y - B.y};
  D = (nod){2. * a.x - A.x, 2. * a.y - A.y};
  if (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) {
    printf("YES\n%.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);
    return 1;
  }
  return 0;
}
int main() {
  int T;
  for (R(T); T--;) {
    scanf("%lf%lf%lf%lf%lf%lf", &a.x, &a.y, &b.x, &b.y, &c.x, &c.y);
    if (che(a, b, c)) continue;
    if (che(b, a, c)) continue;
    if (che(b, c, a)) continue;
    puts("NO\n");
  }
  return 0;
}