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 N, M;
typedef struct node {
  double x;
  double y;
  node operator-(node b) {
    node ret;
    ret.x = x - b.x;
    ret.y = y - b.y;
    return ret;
  }
  node operator+(node b) {
    node ret;
    ret.x = x + b.x;
    ret.y = y + b.y;
    return ret;
  }
  node operator/(double c) {
    node ret;
    ret.x = x / c;
    ret.y = y / c;
    return ret;
  }
  node operator*(double c) {
    node ret;
    ret.x = x * c;
    ret.y = y * c;
    return ret;
  }
} node;
double xmul(node a, node b) { return a.x * b.y - b.x * a.y; }
void getit(double &A, double &B, double &C, node a, node b) {
  double At = b.y - a.y;
  double Bt = a.x - b.x;
  A = -Bt;
  B = At;
  double x = (a.x + b.x) / 2;
  double y = (a.y + b.y) / 2;
  C = A * x + B * y;
}
node getcenter(node A, node B, node C) {
  double A1, B1, C1;
  getit(A1, B1, C1, A, B);
  double A2, B2, C2;
  getit(A2, B2, C2, B, C);
  double det = A1 * B2 - A2 * B1;
  node ret;
  ret.x = (B2 * C1 - B1 * C2) / det;
  ret.y = (A1 * C2 - A2 * C1) / det;
  return ret;
}
bool solve(node a, node b, node c) {
  node A = b * 2 - a;
  node F = getcenter(A, b, c);
  node G = c * 2 - F;
  node E = b * 2 - F;
  node D = a * 2 - E;
  if (xmul(E - D, F - E) < 1e-7 || xmul(F - E, G - F) < 1e-7 ||
      xmul(G - F, D - G) < 1e-7 || xmul(D - G, E - D) < 1e-7)
    return false;
  printf("YES\n%.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf\n", D.x, D.y,
         E.x, E.y, F.x, F.y, G.x, G.y);
  return true;
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    node a, b, c;
    scanf("%lf%lf%lf%lf%lf%lf", &a.x, &a.y, &b.x, &b.y, &c.x, &c.y);
    if (fabs(xmul(a - c, b - c)) < 1e-7 ||
        !solve(a, b, c) && !solve(a, c, b) && !solve(c, a, b) &&
            !solve(c, b, a) && !solve(b, a, c) && !solve(b, c, a))
      printf("NO\n");
  }
  return 0;
}