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;
const double eps = 1e-10;
struct dot {
  double x, y;
  dot() {}
  dot(double x1, double y1) {
    x = x1;
    y = y1;
  }
  void read() { scanf("%lf%lf", &x, &y); }
  void print() { printf("%.10lf %.10lf ", x, y); }
  double operator*(const dot &o) { return x * o.x + y * o.y; }
  double operator%(const dot &o) { return x * o.y - y * o.x; }
  dot operator-(const dot &o) { return dot(x - o.x, y - o.y); }
  dot operator+(const dot &o) { return dot(x + o.x, y + o.y); }
  dot operator*(const double &h) { return dot(x * h, y * h); }
} p[7], g[10];
bool calc(dot a, dot b, dot c) {
  dot d1, d2, f;
  double A, B, t;
  if (fabs((b - a) % (c - a)) <= eps) return 0;
  d1 = (a + c - b * 2) * 0.5;
  d2 = c - b;
  f = b - a;
  swap(f.x, f.y);
  f.x = -f.x;
  B = -(d1 * d2);
  A = f * d2;
  t = B / A;
  g[2] = (a + b) * 0.5;
  g[2] = g[2] + f * t;
  g[1] = g[2] + (a - g[2]) * 2;
  g[3] = g[2] + (b - g[2]) * 2;
  g[4] = g[3] + (c - g[3]) * 2;
  g[5] = g[1];
  g[6] = g[2];
  g[7] = g[3];
  int p = 0;
  for (int i = 1; i <= 4; ++i) {
    f = g[i + 1] - g[i];
    t = f % (g[i + 2] - g[i]);
    if (fabs(t) <= eps) return 0;
    if (p == 0)
      if (t < -eps)
        p = -1;
      else
        p = 1;
    else if (p < 0 && t > eps || p > 0 && t < -eps)
      return 0;
  }
  puts("YES");
  for (int i = 1; i <= 4; ++i) g[i].print();
  puts("");
  return 1;
}
int main() {
  int ca;
  for (scanf("%d", &ca); ca--;) {
    for (int i = 1; i <= 3; ++i) p[i].read();
    if (!calc(p[1], p[2], p[3]))
      if (!calc(p[2], p[1], p[3]))
        if (!calc(p[1], p[3], p[2])) puts("NO\n");
  }
  return 0;
}