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>
double pi = acos(-1);
struct pnt {
  double x, y;
  pnt(double x = 0, double y = 0) : x(x), y(y) {}
  pnt operator-(pnt a) { return pnt(x - a.x, y - a.y); }
  pnt operator+(pnt a) { return pnt(x + a.x, y + a.y); }
  pnt operator*(double a) { return pnt(x * a, y * a); }
  pnt operator/(double a) { return pnt(x / a, y / a); }
  double operator^(pnt a) { return x * a.y - y * a.x; }
  double operator&(pnt a) { return x * a.x + y * a.y; }
  void input() { x = y = 0, scanf("%lf %lf", &x, &y); }
  void print() { printf("%.9lf %.9lf ", x, y); }
};
double dist(pnt a) { return sqrt(a & a); }
bool intersect(pnt a, pnt b, pnt c, pnt d, pnt &res) {
  double den = a - b ^ c - d;
  if (fabs(den) < 1e-7) return 0;
  double x = (a - d ^ c - d) / den;
  res = a * (1 - x) + b * x;
  return 1;
}
int chk(pnt a, pnt b, pnt c) {
  pnt res, A, B, C, D;
  int ret =
      intersect((a + b) / 2, (a + b) / 2 + pnt(b.y - a.y, a.x - b.x),
                (c + b) / 2, (c + b) / 2 + pnt(b.y - c.y, c.x - b.x), res);
  if (!ret) return 0;
  intersect((a + b) / 2, (a + b) / 2 + pnt(b.y - a.y, a.x - b.x), b,
            b + pnt(b.y - c.y, c.x - b.x), A);
  intersect(b, b + pnt(b.y - a.y, a.x - b.x), (c + b) / 2,
            (c + b) / 2 + pnt(b.y - c.y, c.x - b.x), B);
  A = A * 2 - res;
  B = b * 2 - A;
  C = c * 2 - B;
  D = a * 2 - A;
  pnt AA = B - A, BB = C - B, CC = D - C, DD = A - D;
  if (fabs(AA ^ BB) < 1e-7) return 0;
  if (fabs(BB ^ CC) < 1e-7) return 0;
  if (fabs(CC ^ DD) < 1e-7) return 0;
  if (fabs(DD ^ AA) < 1e-7) return 0;
  int fg = 0;
  fg += ((AA ^ BB) < 0);
  fg += ((BB ^ CC) < 0);
  fg += ((CC ^ DD) < 0);
  fg += ((DD ^ AA) < 0);
  if (fg && fg != 4) return 0;
  puts("YES");
  A.print();
  B.print();
  C.print();
  D.print();
  puts("");
  return 1;
}
int main() {
  int T;
  for (scanf("%d", &T); T--;) {
    pnt a, b, c;
    a.input();
    b.input();
    c.input();
    if (chk(a, b, c)) continue;
    if (chk(b, c, a)) continue;
    if (chk(c, a, b)) continue;
    printf("NO\n\n");
  }
  return 0;
}