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 point {
  double x, y;
};
int t;
double cross(point a, point b, point c) {
  return (a.x * b.y + b.x * c.y + c.x * a.y) -
         (a.y * b.x + b.y * c.x + c.y * a.x);
}
bool can(point a, point b, point c) {
  double a1, b1, c1, a2, b2, c2, xa, xb, xc, xd, ya, yb, yc, yd;
  a1 = 2 * (a.x - b.x);
  b1 = 2 * (a.y - b.y);
  c1 = b.x * b.x + b.y * b.y - a.x * a.x - a.y * a.y;
  a2 = 2 * (b.x - c.x);
  b2 = 2 * (b.y - c.y);
  c2 = -3 * (b.x * b.x + b.y * b.y) - (c.x * c.x + c.y * c.y) +
       4 * (b.x * c.x + b.y * c.y);
  xa = (c2 * b1 - c1 * b2) / (a1 * b2 - a2 * b1);
  ya = (a2 * c1 - a1 * c2) / (a1 * b2 - a2 * b1);
  xb = b.x * 2 - xa;
  yb = b.y * 2 - ya;
  xc = 2 * c.x - xb;
  yc = 2 * c.y - yb;
  xd = 2 * a.x - xa;
  yd = 2 * a.y - ya;
  double A, B, C, D;
  A = cross((point){xa, ya}, (point){xb, yb}, (point){xc, yc});
  B = cross((point){xb, yb}, (point){xc, yc}, (point){xd, yd});
  C = cross((point){xc, yc}, (point){xd, yd}, (point){xa, ya});
  D = cross((point){xd, yd}, (point){xa, ya}, (point){xb, yb});
  if ((A > 0 && B > 0 && C > 0 && D > 0) ||
      (A < 0 && B < 0 && C < 0 && D < 0)) {
    puts("YES");
    printf("%.10lf %.10lf ", xa, ya);
    printf("%.10lf %.10lf ", xb, yb);
    printf("%.10lf %.10lf ", xc, yc);
    printf("%.10lf %.10lf ", xd, yd);
    return true;
  }
  return false;
}
void solve() {
  point a, b, c;
  scanf("%lf%lf", &a.x, &a.y);
  scanf("%lf%lf", &b.x, &b.y);
  scanf("%lf%lf", &c.x, &c.y);
  if (cross(a, b, c) == 0) {
    puts("NO");
    return;
  }
  if (can(a, b, c) || can(b, c, a) || can(c, a, b)) {
    return;
  }
  puts("NO");
}
int main() {
  scanf("%d", &t);
  while (t--) {
    solve();
    puts("");
  }
  return 0;
}