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;
struct yqh {
  double x, y;
  void get() { scanf("%lf%lf", &x, &y); }
} a, b, c;
int T;
double chaji(yqh a, yqh b, yqh c) {
  return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
yqh cross(yqh a, yqh b, yqh c, yqh d) {
  double t1 = chaji(a, c, b), t2 = chaji(a, b, d);
  yqh e;
  e.x = (c.x * t2 + d.x * t1) / (t1 + t2);
  e.y = (c.y * t2 + d.y * t1) / (t1 + t2);
  return e;
}
void get_mid(yqh a, yqh b, yqh &c, yqh &d) {
  c.x = (a.x + b.x) / 2;
  c.y = (a.y + b.y) / 2;
  d.x = c.x + b.y - a.y;
  d.y = c.y + a.x - b.x;
}
bool get_ans(yqh a, yqh b, yqh c) {
  yqh A, B, C, D, d, e, na, nb, nc, nd;
  get_mid(a, b, na, nb);
  get_mid(b, c, nc, nd);
  d.x = b.x + nd.x - nc.x;
  d.y = b.y + nd.y - nc.y;
  d = cross(b, d, na, nb);
  e = cross(na, nb, nc, nd);
  A.x = 2 * d.x - e.x;
  A.y = 2 * d.y - e.y;
  B.x = 2 * b.x - A.x;
  B.y = 2 * b.y - A.y;
  C.x = 2 * c.x - B.x;
  C.y = 2 * c.y - B.y;
  D.x = 2 * a.x - A.x;
  D.y = 2 * a.y - A.y;
  if (chaji(A, B, C) * chaji(B, C, D) > eps &&
      chaji(B, C, D) * chaji(C, D, A) > eps &&
      chaji(C, D, A) * chaji(D, A, B) > eps) {
    printf("YES\n");
    printf("%.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf\n", A.x, A.y, B.x,
           B.y, C.x, C.y, D.x, D.y);
    return true;
  } else
    return false;
}
int main() {
  scanf("%d", &T);
  while (T--) {
    a.get();
    b.get();
    c.get();
    if (fabs(chaji(a, b, c)) > eps &&
        (get_ans(a, b, c) || get_ans(b, a, c) || get_ans(a, c, b)))
      ;
    else
      printf("NO\n\n");
  }
  return 0;
}