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
#include <bits/stdc++.h>
using namespace std;
struct point {
  double x, y, z;
  point() {}
  point(double x, double y, double z = 1) : x(x), y(y), z(z) {}
  point operator*(const point &rhs) {
    return point(y * rhs.z - z * rhs.y, z * rhs.x - x * rhs.z,
                 x * rhs.y - y * rhs.x);
  }
  point operator-(const point &b) { return point(x - b.x, y - b.y); }
  point operator+(const point &b) { return point(x + b.x, y + b.y); }
  point operator*(double k) const { return point(k * x, k * y); }
  point projection() { return point(x / z, y / z); }
  void print() { printf("%2.9f %0.9f ", x, y); }
};
point perpen(point &r) { return point(-r.y, r.x); }
point line(point l, point t) {
  double c = l.y * t.x - l.x * t.y;
  return point(-l.y, l.x, c);
}
double ccw(point a, point b) { return a.x * b.y - a.y * b.x; }
double ccw(point &a, point &b, point &c) { return ccw(b - a, c - a); }
point p[3];
void solve() {
  point m, l, newbie, k;
  point A[4];
  int i, j;
  for (i = 0; i < 3; ++i) {
    m = p[i];
    l = p[(i + 1) % 3];
    k = p[(i + 2) % 3];
    newbie = m * 2 - l;
    point l1 = newbie - m, l2 = k - m;
    l1 = perpen(l1), l2 = perpen(l2);
    l1 = line(l1, (newbie + m) * 0.5);
    l2 = line(l2, (k + m) * 0.5);
    A[0] = l1 * l2;
    if (A[0].z == 0) break;
    A[0] = A[0].projection();
    A[1] = m * 2 - A[0];
    A[3] = k * 2 - A[0], A[2] = l * 2 - A[1];
    bool istrue = true;
    double direction = ccw(A[0], A[1], A[2]);
    for (j = 1; j < 4; ++j)
      if (ccw(A[j], A[(j + 1) % 4], A[(j + 2) % 4]) * direction <= 0) {
        istrue = false;
        break;
      }
    if (!istrue) continue;
    printf("YES\n");
    for (j = 0; j < 4; ++j) A[j].print();
    putchar('\n');
    return;
  }
  printf("NO\n\n");
}
int main() {
  int T, i;
  scanf("%d", &T);
  while (T--) {
    for (i = 0; i < 3; ++i) scanf("%lf %lf", &p[i].x, &p[i].y);
    solve();
  }
}
