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-8;
int T;
pair<double, double> a, b, c;
double Cross(pair<double, double> a, pair<double, double> b,
             pair<double, double> c) {
  return (a.first * b.second + b.first * c.second + c.first * a.second) -
         (b.first * a.second + c.first * b.second + a.first * c.second);
}
inline int Read() {
  char ch;
  int num, f = 0;
  while (!isdigit(ch = getchar())) f |= (ch == '-');
  num = ch - '0';
  while (isdigit(ch = getchar())) num = num * 10 + ch - '0';
  return f ? -num : num;
}
pair<double, double> read() {
  pair<double, double> t;
  t.first = Read();
  t.second = Read();
  return t;
}
bool check(pair<double, double> x, pair<double, double> y,
           pair<double, double> z) {
  double A0 = 2 * (x.first - y.first), A1 = 2 * (y.first - z.first);
  double B0 = 2 * (x.second - y.second), B1 = 2 * (y.second - z.second);
  double C0 = y.first * y.first - x.first * x.first + y.second * y.second -
              x.second * x.second;
  double C1 = -3 * (y.first * y.first + y.second * y.second) -
              (z.first * z.first + z.second * z.second) +
              4 * (y.first * z.first + y.second * z.second);
  pair<double, double> A, B, C, D;
  A.first = (B0 * C1 - B1 * C0) / (A0 * B1 - A1 * B0);
  A.second = (A1 * C0 - A0 * C1) / (A0 * B1 - A1 * B0);
  B.first = 2 * y.first - A.first;
  B.second = 2 * y.second - A.second;
  C.first = 2 * x.first - A.first;
  C.second = 2 * x.second - A.second;
  D.first = 2 * z.first - B.first;
  D.second = 2 * z.second - B.second;
  double P1 = Cross(C, A, B), P2 = Cross(A, B, D), P3 = Cross(B, D, C),
         P4 = Cross(D, C, A);
  if ((P1 > 0 && P2 > 0 && P3 > 0 && P4 > 0) ||
      (P1 < 0 && P2 < 0 && P3 < 0 && P4 < 0)) {
    printf("YES\n");
    printf("%0.10lf %0.10lf ", A.first, A.second);
    printf("%0.10lf %0.10lf ", B.first, B.second);
    printf("%0.10lf %0.10lf ", D.first, D.second);
    printf("%0.10lf %0.10lf\n", C.first, C.second);
    return true;
  }
  return false;
}
bool solve() {
  if (Cross(a, b, c) && (check(a, b, c) || check(c, a, b) || check(b, c, a)))
    return true;
  return false;
}
int main() {
  scanf("%d", &T);
  while (T--) {
    a = read();
    b = read();
    c = read();
    if (!solve()) printf("NO\n\n");
  }
}