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;
  point() {}
  point(double x1, double y1) {
    x = x1;
    y = y1;
  }
  point operator+(const point &t) { return point(x + t.x, y + t.y); }
  point operator-(const point &t) { return point(x - t.x, y - t.y); }
  point operator/(double k) { return point(x / k, y / k); }
  point operator*(double k) { return point(x * k, y * k); }
  double operator%(const point &t) { return x * t.y - y * t.x; }
} a[5], g[8];
int b[5];
struct Tprogram {
  void open() {
    freopen("1.in", "r", stdin);
    freopen("1.out", "w", stdout);
  }
  void close() {}
  void init() {
    scanf("%lf%lf%lf%lf%lf%lf", &a[1].x, &a[1].y, &a[2].x, &a[2].y, &a[3].x,
          &a[3].y);
  }
  void ok() {
    printf("YES\n");
    for (int i = 1; i <= 4; i++) printf("%.12lf %.12lf ", g[i].x, g[i].y);
    printf("\n");
  }
  bool check(point a, point b, point c) {
    point o1 = (a + b) / 2, o2 = (b + c) / 2;
    point g1 = b - a, g2 = c - b;
    g1 = point(g1.y, -g1.x);
    g2 = point(g2.y, -g2.x);
    if (g1 % g2 < 1e-12) return 0;
    double d = (b * 2 - o1 - o2) % g2;
    d /= g1 % g2;
    g[2] = o1 + g1 * d;
    g[3] = b * 2 - g[2];
    g[4] = c * 2 - g[3];
    g[1] = a * 2 - g[2];
    g[0] = g[4];
    g[5] = g[1];
    for (int i = 1; i <= 4; i++)
      if ((g[i + 1] - g[i]) % (g[i] - g[i - 1]) > -1e-10) goto die;
    ok();
    return 1;
  die:;
    for (int i = 1; i <= 4; i++)
      if ((g[i + 1] - g[i]) % (g[i] - g[i - 1]) < 1e-10) return 0;
    ok();
    return 1;
  }
  void work() {
    for (int i = 1; i <= 3; i++) b[i] = i;
    do {
      if (check(a[b[1]], a[b[2]], a[b[3]])) return;
    } while (next_permutation(b + 1, b + 4));
    printf("NO\n\n");
  }
} Program;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    Program.init();
    Program.work();
  }
  return 0;
}