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 int maxn = 100;
static int T;
double X1, X2, X3, Y1, Y2, Y3;
double sq[5][2];
int Mul(double X1, double Y1, double X2, double Y2, double X3, double Y3) {
  double t = (X2 - X1) * (Y3 - Y1) - (X3 - X1) * (Y2 - Y1);
  if (fabs(t) < 1E-9) return 0;
  if (t < 0) return -1;
  if (t > 0) return 1;
}
bool Ck(double X1, double Y1, double X2, double Y2, double X3, double Y3) {
  double tx = 2 * X3 - X1, ty = 2 * Y3 - Y1;
  if (fabs((X2 - X1) * (Y3 - Y1) - (X3 - X1) * (Y2 - Y1)) < 0.000001)
    return false;
  double A1 = 2 * (X3 - X2), B1 = 2 * (Y3 - Y2),
         C1 = X2 * X2 + Y2 * Y2 - X3 * X3 - Y3 * Y3;
  double A2 = 2 * (tx - X2), B2 = 2 * (ty - Y2),
         C2 = X2 * X2 + Y2 * Y2 - tx * tx - ty * ty;
  sq[2][0] = (B1 * C2 - C1 * B2) / (A1 * B2 - A2 * B1);
  sq[2][1] = (A1 * C2 - C1 * A2) / (B1 * A2 - B2 * A1);
  sq[1][0] = X2 * 2 - sq[2][0];
  sq[1][1] = Y2 * 2 - sq[2][1];
  sq[3][0] = X3 * 2 - sq[2][0];
  sq[3][1] = Y3 * 2 - sq[2][1];
  sq[4][0] = X1 * 2 - sq[3][0];
  sq[4][1] = Y1 * 2 - sq[3][1];
  int t1 = Mul(sq[1][0], sq[1][1], sq[4][0], sq[4][1], sq[3][0], sq[3][1]);
  int t2 = Mul(sq[2][0], sq[2][1], sq[1][0], sq[1][1], sq[4][0], sq[4][1]);
  int t3 = Mul(sq[3][0], sq[3][1], sq[2][0], sq[2][1], sq[1][0], sq[1][1]);
  int t4 = Mul(sq[4][0], sq[4][1], sq[3][0], sq[3][1], sq[2][0], sq[2][1]);
  if (t1 == t2 && t2 == t3 && t3 == t4 && t4 != 0) {
    printf("YES\n");
    for (int i = 1; i <= 4; i++) printf("%.10lf %.10lf ", sq[i][0], sq[i][1]);
    printf("\n");
    return true;
  }
  return false;
}
void Sol(double X1, double Y1, double X2, double Y2, double X3, double Y3) {
  if (Ck(X1, Y1, X2, Y2, X3, Y3)) return;
  if (Ck(X1, Y1, X3, Y3, X2, Y2)) return;
  if (Ck(X3, Y3, X2, Y2, X1, Y1)) return;
  printf("NO\n\n");
}
int main() {
  scanf("%d", &T);
  while (T--) {
    scanf("%lf%lf%lf%lf%lf%lf\n", &X1, &Y1, &X2, &Y2, &X3, &Y3);
    Sol(X1, Y1, X2, Y2, X3, Y3);
  }
  return 0;
}