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;
double prodesc(complex<double> p1, complex<double> p2) {
  return real(conj(p1) * p2);
}
double prodvec(complex<double> p1, complex<double> p2) {
  return imag(conj(p1) * p2);
}
double absolut(double x) {
  if (x < 0) return -x;
  return x;
}
double error = 0.000000000001;
void escriu(complex<double> p) { cout << real(p) << " " << imag(p); }
complex<double> llegeix() {
  double x, y;
  cin >> x >> y;
  return complex<double>(x, y);
}
bool trobasol(complex<double> p1, complex<double> p2, complex<double> p3,
              complex<double> &s1, complex<double> &s2, complex<double> &s3,
              complex<double> &s4) {
  complex<double> q1 = (p1 + p2) / 2.0;
  complex<double> v1 = (p2 - p1) * complex<double>(0, 1);
  complex<double> q2 = p2 - (p3 - p2) / 2.0;
  complex<double> v2 = (p3 - p2) * complex<double>(0, 1);
  if (absolut(prodvec(v1, v2)) < error) {
    return false;
  } else {
    double landa = prodvec(q2 - q1, v2) / prodvec(v1, v2);
    s1 = q1 + landa * v1;
    s2 = s1 + 2.0 * (p2 - s1);
    s3 = s2 + 2.0 * (p3 - s2);
    s4 = s1 + 2.0 * (p1 - s1);
    if ((prodvec(s2 - s1, s3 - s2) > error and
         prodvec(s3 - s2, s4 - s3) > error and
         prodvec(s4 - s3, s1 - s4) > error and
         prodvec(s1 - s4, s2 - s1) > error) or
        (prodvec(s2 - s1, s3 - s2) < -error and
         prodvec(s3 - s2, s4 - s3) < -error and
         prodvec(s4 - s3, s1 - s4) < -error and
         prodvec(s1 - s4, s2 - s1) < -error)) {
      return true;
    } else {
      return false;
    }
  }
}
int main() {
  cout.setf(ios::fixed);
  cout.precision(9);
  int casos;
  cin >> casos;
  for (int cas = 0; cas < casos; cas++) {
    complex<double> p1 = llegeix();
    complex<double> p2 = llegeix();
    complex<double> p3 = llegeix();
    complex<double> s1, s2, s3, s4;
    if (trobasol(p1, p2, p3, s1, s2, s3, s4) or
        trobasol(p1, p3, p2, s1, s2, s3, s4) or
        trobasol(p2, p1, p3, s1, s2, s3, s4) or
        trobasol(p2, p3, p1, s1, s2, s3, s4) or
        trobasol(p3, p1, p2, s1, s2, s3, s4) or
        trobasol(p3, p2, p1, s1, s2, s3, s4)) {
      cout << "YES" << endl;
      escriu(s1);
      cout << " ";
      escriu(s2);
      cout << " ";
      escriu(s3);
      cout << " ";
      escriu(s4);
      cout << endl;
    } else {
      cout << "NO" << endl << endl;
    }
  }
}