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>
struct point {
  double x, y;
  point(double x = 0, double y = 0) : x(x), y(y) {}
};
point p1, p2, p3;
double cp(point a, point b) { return a.x * b.y - a.y * b.x; }
point operator-(point a, point b) { return point(a.x - b.x, a.y - b.y); }
int fcmp(double x) {
  if (fabs(x) < 1e-8) return 0;
  return x > 0 ? 1 : -1;
}
int check(point p1, point p2, point p3) {
  double v1, v2, v3, v4, a1, b1, c1, a2, b2, c2;
  point a, b, c, d;
  a1 = (p2.x - p1.x) * 2;
  b1 = (p2.y - p1.y) * 2;
  c1 = ((2 * p1.x - p2.x) * (2 * p1.x - p2.x)) +
       ((2 * p1.y - p2.y) * (2 * p1.y - p2.y)) - ((p1.x) * (p1.x)) -
       ((p1.y) * (p1.y));
  a2 = (p3.x - 2 * p2.x + p1.x) * 2;
  b2 = (p3.y - 2 * p2.y + p1.y) * 2;
  c2 = ((p1.x) * (p1.x)) + ((p1.y) * (p1.y)) -
       ((p3.x - 2 * p2.x + 2 * p1.x) * (p3.x - 2 * p2.x + 2 * p1.x)) -
       ((p3.y - 2 * p2.y + 2 * p1.y) * (p3.y - 2 * p2.y + 2 * p1.y));
  if (fcmp(a1 * b2 - a2 * b1) == 0) return 0;
  a = point((c2 * b1 - c1 * b2) / (a1 * b2 - a2 * b1),
            (c2 * a1 - c1 * a2) / (b1 * a2 - b2 * a1));
  b = point(2 * p1.x - a.x, 2 * p1.y - a.y);
  c = point(2 * p2.x - 2 * p1.x + a.x, 2 * p2.y - 2 * p1.y + a.y);
  d = point(2 * p3.x - 2 * p2.x + 2 * p1.x - a.x,
            2 * p3.y - 2 * p2.y + 2 * p1.y - a.y);
  v1 = cp(b - a, c - a);
  v2 = cp(c - b, d - b);
  v3 = cp(d - c, a - c);
  v4 = cp(a - d, b - d);
  if ((v1 < 0 && v2 < 0 && v3 < 0 && v4 < 0) ||
      (v1 > 0 && v2 > 0 && v3 > 0 && v4 > 0)) {
    printf("YES\n%.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf\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;
  scanf("%d", &t);
  while (t--) {
    scanf("%lf%lf%lf%lf%lf%lf", &p1.x, &p1.y, &p2.x, &p2.y, &p3.x, &p3.y);
    if ((check(p1, p2, p3) || check(p1, p3, p2) || check(p2, p1, p3)) == 0)
      printf("NO\n\n");
  }
}