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;
int Get() {
  char c;
  while (c = getchar(), c < '0' || c > '9')
    ;
  int X = c - 48;
  while (c = getchar(), c >= '0' && c <= '9') X = X * 10 + c - 48;
  return X;
}
double Cross(double Xa, double Ya, double Xb, double Yb, double Xc, double Yc) {
  return (Xa * Yb + Xb * Yc + Xc * Ya) - (Xb * Ya + Xc * Yb + Xa * Yc);
}
bool Check(int Xa, int Ya, int Xb, int Yb, int Xc, int Yc) {
  double A0 = 2 * (Xa - Xb), B0 = 2 * (Ya - Yb);
  double C0 = Xb * Xb - Xa * Xa + Yb * Yb - Ya * Ya;
  double A1 = 2 * (Xb - Xc), B1 = 2 * (Yb - Yc);
  double C1 =
      -3 * (Xb * Xb + Yb * Yb) - (Xc * Xc + Yc * Yc) + 4 * (Xb * Xc + Yb * Yc);
  double Xp = (C1 * B0 - C0 * B1) / (A0 * B1 - A1 * B0);
  double Yp = (A1 * C0 - A0 * C1) / (A0 * B1 - A1 * B0);
  double Xq = 2 * Xb - Xp, Yq = 2 * Yb - Yp;
  double _Xp = 2 * Xa - Xp, _Yp = 2 * Ya - Yp;
  double _Xq = 2 * Xc - Xq, _Yq = 2 * Yc - Yq;
  double a = Cross(_Xp, _Yp, Xp, Yp, Xq, Yq);
  double b = Cross(Xp, Yp, Xq, Yq, _Xq, _Yq);
  double c = Cross(Xq, Yq, _Xq, _Yq, _Xp, _Yp);
  double d = Cross(_Xq, _Yq, _Xp, _Yp, Xp, Yp);
  if ((a < 0 && b < 0 && c < 0 && d < 0) ||
      (a > 0 && b > 0 && c > 0 && d > 0)) {
    printf("YES\n");
    printf("%0.10lf %0.10lf ", Xp, Yp);
    printf("%0.10lf %0.10lf ", Xq, Yq);
    printf("%0.10lf %0.10lf ", _Xq, _Yq);
    printf("%0.10lf %0.10lf\n", _Xp, _Yp);
    return true;
  }
  return false;
}
void Work(int Xa, int Ya, int Xb, int Yb, int Xc, int Yc) {
  if (Cross(Xa, Ya, Xb, Yb, Xc, Yc)) {
    if (Check(Xa, Ya, Xb, Yb, Xc, Yc)) return;
    if (Check(Xb, Yb, Xc, Yc, Xa, Ya)) return;
    if (Check(Xc, Yc, Xa, Ya, Xb, Yb)) return;
  }
  printf("NO\n\n");
}
int main() {
  int Test = Get();
  while (Test--) {
    int Xa = Get(), Ya = Get();
    int Xb = Get(), Yb = Get();
    int Xc = Get(), Yc = Get();
    Work(Xa, Ya, Xb, Yb, Xc, Yc);
  }
  return 0;
}