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-6;
int sign(double x) {
  if (x > eps) return 1;
  if (x < -eps) return -1;
  return 0;
}
class Vector {
 public:
  double x, y;
  Vector(double x0 = 0, double y0 = 0) : x(x0), y(y0) {}
  Vector normal() { return Vector(-y, x); }
};
Vector operator+(Vector a, Vector b) { return Vector(a.x + b.x, a.y + b.y); }
Vector operator-(Vector a, Vector b) { return Vector(a.x - b.x, a.y - b.y); }
Vector operator*(Vector a, double b) { return Vector(a.x * b, a.y * b); }
Vector operator*(double a, Vector b) { return Vector(a * b.x, a * b.y); }
Vector operator/(Vector a, double b) { return Vector(a.x / b, a.y / b); }
double cross(Vector a, Vector b) { return a.x * b.y - a.y * b.x; }
double dot(Vector a, Vector b) { return a.x * b.x + a.y * b.y; }
Vector intersection(Vector P1, Vector v1, Vector P2, Vector v2) {
  double t = cross(P2 - P1, v1) / cross(v1, v2);
  return P2 + t * v2;
}
int convex_counter(Vector *points, int n) {
  for (int i = 0; i < n; i++) {
    Vector cur = points[i], nxt = points[(i + 1) % n],
           sec = points[(i + 2) % n];
    if (sign(cross(sec - nxt, cur - nxt)) <= 0) return 0;
  }
  return 1;
}
int findTetragon(Vector E, Vector F, Vector G, Vector *points) {
  if (sign(cross(E - F, G - F)) == 0) return 0;
  if (cross(G - F, E - F) < 0) swap(E, G);
  Vector Pb, Pc;
  Vector vb, vc;
  Pb = (F + E) / 2;
  Pc = (F + G) / 2;
  vb = (F - E).normal();
  vc = (F - G).normal();
  Vector I = intersection(Pb, vb, Pc, vc);
  double tb = cross((2 * F - Pc - Pb), vc) / cross(vb, vc);
  Vector A, B, C, D;
  B = Pb + tb * vb;
  C = 2 * F - B;
  if (dot(B - Pb, I - Pb) >= 0) return 0;
  if (dot(C - Pc, I - Pc) >= 0) return 0;
  A = 2 * E - B;
  D = 2 * G - C;
  if (cross(B - A, D - A) > 0 && cross(A - D, C - D) > 0) {
    points[0] = A;
    points[1] = B;
    points[2] = C;
    points[3] = D;
    return 1;
  }
  return 0;
}
int get() {
  Vector P[3], points[4];
  for (int i = 0; i < 3; i++) scanf("%lf%lf", &P[i].x, &P[i].y);
  for (int j = 0; j < 3; j++) {
    int res = findTetragon(P[j], P[(j + 1) % 3], P[(j + 2) % 3], points);
    if (res) {
      printf("YES\n");
      for (int k = 0; k < 4; k++)
        printf("%.9f %.9f ", points[k].x, points[k].y);
      printf("\n");
      return 1;
    }
  }
  printf("NO\n\n");
  return 0;
}
int main() {
  int n;
  scanf("%d", &n);
  while (n--) get();
  return 0;
}