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;
complex<double> a, b, c;
int T, x, y;
double crs(complex<double> a, complex<double> b) { return imag(a * conj(b)); }
bool G(complex<double> a, complex<double> b, complex<double> c) {
  complex<double> d = b + b - c, X = b - a, Y = d - a,
                  z = complex<double>(norm(X), norm(Y)),
                  x = complex<double>(real(X) * 2, real(Y) * 2),
                  y = complex<double>(imag(X) * 2, imag(Y) * 2),
                  A = complex<double>(crs(z, y), crs(x, z)) / crs(x, y) + a,
                  B = b + b - A, C = c + c - B, D = a + a - A;
  if (crs(A - D, B - A) < 1e-7 || crs(B - A, C - B) < 1e-7 ||
      crs(C - B, D - C) < 1e-7 || crs(D - C, A - D) < 1e-7)
    return 1;
  else
    return puts("YES"), printf("%.9f %.9f ", real(A), imag(A)),
           printf("%.9f %.9f ", real(B), imag(B)),
           printf("%.9f %.9f ", real(C), imag(C)),
           printf("%.9f %.9f ", real(D), imag(D)), 0;
}
int main() {
  for (scanf("%d", &T); T; T--) {
    scanf("%d%d", &x, &y), a = complex<double>(x, y), scanf("%d%d", &x, &y),
                           b = complex<double>(x, y), scanf("%d%d", &x, &y),
                           c = complex<double>(x, y);
    if (fabs(crs(b - a, c - a)) < 1e-7 ||
        (G(a, b, c) && G(a, c, b) && G(b, a, c) && G(b, c, a) && G(c, a, b) &&
         G(c, b, a)))
      puts("NO");
    puts("");
  }
}