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;
typedef struct point_struct {
  double x, y;
} point_type;
typedef struct seg_struct {
  double a, b, c;
} seg_type;
int compare(double x, double y) {
  if (fabs(x - y) <= 1e-6) return 0;
  if (x < y) return -1;
  return 1;
}
double dist(point_type a, point_type b) {
  a.x -= b.x;
  a.y -= b.y;
  double tmp = a.x * a.x + a.y * a.y;
  return tmp;
}
int ccw(point_type a, point_type b, point_type c) {
  a.x = b.x - a.x;
  a.y = b.y - a.y;
  b.x = c.x - b.x;
  b.y = c.y - b.y;
  int tmp = compare(a.x * b.y - a.y * b.x, 0);
  return tmp;
}
void output(point_type d, point_type e, point_type f, point_type g) {
  printf("YES\n%.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf\n", d.x, d.y,
         e.x, e.y, f.x, f.y, g.x, g.y);
}
bool check(point_type a, point_type b, point_type c) {
  seg_type d1, d2;
  d1.a = b.x - a.x;
  d1.b = b.y - a.y;
  d1.c = (a.x + b.x) / 2 * d1.a + (a.y + b.y) / 2 * d1.b;
  point_type t1, t2;
  t1.x = (b.x + c.x) / 2;
  t1.y = (b.y + c.y) / 2;
  t2.x = t1.x + b.y - c.y;
  t2.y = t1.y + c.x - b.x;
  t1.x = b.x * 2 - t1.x;
  t1.y = b.y * 2 - t1.y;
  t2.x = b.x * 2 - t2.x;
  t2.y = b.y * 2 - t2.y;
  d2.a = t1.y - t2.y;
  d2.b = t2.x - t1.x;
  d2.c = t1.x * d2.a + t1.y * d2.b;
  double dd, dx, dy;
  dd = d1.a * d2.b - d2.a * d1.b;
  if (compare(dd, 0) == 0) return false;
  dx = d1.c * d2.b - d2.c * d1.b;
  dy = d1.a * d2.c - d2.a * d1.c;
  point_type d, e, f, g;
  d.x = dx / dd;
  d.y = dy / dd;
  e.x = 2 * b.x - d.x;
  e.y = 2 * b.y - d.y;
  f.x = 2 * c.x - e.x;
  f.y = 2 * c.y - e.y;
  g.x = 2 * a.x - d.x;
  g.y = 2 * a.y - d.y;
  if (ccw(d, e, f) == 0) return false;
  if (ccw(d, e, f) == ccw(e, f, g) && ccw(e, f, g) == ccw(f, g, d) &&
      ccw(f, g, d) == ccw(g, d, e) && ccw(g, d, e) == ccw(d, e, f)) {
    if (ccw(d, e, f) == -1)
      output(d, e, f, g);
    else
      output(g, f, e, d);
    return true;
  }
  return false;
}
int main() {
  int ntests;
  point_type a, b, c;
  scanf("%d", &ntests);
  while (ntests > 0) {
    ntests--;
    scanf("%lf %lf %lf %lf %lf %lf", &a.x, &a.y, &b.x, &b.y, &c.x, &c.y);
    if (!check(a, b, c))
      if (!check(b, c, a))
        if (!check(c, a, b)) printf("NO\n\n");
  }
  return 0;
}