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;
inline void File() {
  freopen("23D.in", "r", stdin);
  freopen("23D.out", "w", stdout);
}
inline int read() {
  int ret = 0, p = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') p = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    ret = ret * 10 + ch - '0';
    ch = getchar();
  }
  return ret * p;
}
struct Node {
  long double x, y;
  void Read() {
    int X = read(), Y = read();
    x = X;
    y = Y;
  }
  void Print() {
    double X = x, Y = y;
    printf("%.9lf %.9lf", X, Y);
  }
};
Node mirnode(Node b, Node a) {
  Node tmp;
  tmp.x = 2 * a.x - b.x;
  tmp.y = 2 * a.y - b.y;
  return tmp;
}
Node getcircle(Node a, Node b, Node c) {
  Node ret;
  ret.x = (a.x * a.x + a.y * a.y - b.x * b.x - b.y * b.y) * (a.y - c.y) -
          (a.x * a.x + a.y * a.y - c.x * c.x - c.y * c.y) * (a.y - b.y);
  ret.x =
      ret.x / (2 * (a.y - c.y) * (a.x - b.x) - 2 * (a.y - b.y) * (a.x - c.x));
  ret.y = (a.x * a.x + a.y * a.y - b.x * b.x - b.y * b.y) * (a.x - c.x) -
          (a.x * a.x + a.y * a.y - c.x * c.x - c.y * c.y) * (a.x - b.x);
  ret.y =
      ret.y / (2 * (a.y - b.y) * (a.x - c.x) - 2 * (a.y - c.y) * (a.x - b.x));
  return ret;
}
int mul(Node a, Node b, Node c) {
  Node A, B;
  A.x = b.x - a.x;
  A.y = b.y - a.y;
  B.x = c.x - a.x;
  B.y = c.y - a.y;
  return A.x * B.y - A.y * B.x;
}
bool check(Node a, Node b, Node c) {
  Node bb = mirnode(b, a);
  if (mul(a, bb, c) == 0) return 0;
  Node B = getcircle(a, bb, c);
  Node A = mirnode(B, a);
  Node C = mirnode(B, c);
  Node D = mirnode(A, b);
  bool t = mul(A, B, C) > 0 && mul(A, B, D) > 0 && mul(A, C, D) > 0 &&
           mul(B, C, D) > 0;
  t = t | (mul(A, B, C) < 0 && mul(A, B, D) < 0 && mul(A, C, D) < 0 &&
           mul(B, C, D) < 0);
  if (t == 0) return 0;
  puts("YES");
  A.Print();
  printf(" ");
  B.Print();
  printf(" ");
  C.Print();
  printf(" ");
  D.Print();
  printf("\n");
  return 1;
}
void getans(Node a, Node b, Node c) {
  if (check(a, b, c) == 1) return;
  if (check(a, c, b) == 1) return;
  if (check(b, a, c) == 1) return;
  if (check(b, c, a) == 1) return;
  if (check(c, a, b) == 1) return;
  if (check(c, b, a) == 1) return;
  puts("NO\n");
}
void work() {
  int T = read();
  while (T--) {
    Node a, b, c;
    a.Read();
    b.Read();
    c.Read();
    getans(a, b, c);
  }
}
int main() {
  work();
  return 0;
}