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-10;
pair<double, double> za, zb, zc, zd;
pair<double, double> a, b, c, d, e;
pair<double, double> A, B, C, D;
double cha(pair<double, double> a, pair<double, double> b,
           pair<double, double> c) {
  return (b.first - a.first) * (c.second - a.second) -
         (b.second - a.second) * (c.first - a.first);
}
pair<double, double> jiao(pair<double, double> a, pair<double, double> b,
                          pair<double, double> c, pair<double, double> d) {
  double t1 = cha(a, c, b), t2 = cha(a, b, d), t3 = cha(c, a, d),
         t4 = cha(c, d, b);
  return make_pair((c.first * t2 + d.first * t1) / (t1 + t2),
                   (c.second * t2 + d.second * t1) / (t1 + t2));
}
void work(pair<double, double> a, pair<double, double> b,
          pair<double, double> &c, pair<double, double> &d) {
  c = make_pair((a.first + b.first) / 2, (a.second + b.second) / 2);
  d = make_pair(c.first + b.second - a.second, c.second + a.first - b.first);
}
bool get(pair<double, double> a, pair<double, double> b,
         pair<double, double> c) {
  work(a, b, za, zb), work(b, c, zc, zd);
  d = make_pair(b.first + zd.first - zc.first,
                b.second + zd.second - zc.second);
  d = jiao(b, d, za, zb);
  e = jiao(za, zb, zc, zd);
  A = make_pair(2 * d.first - e.first, 2 * d.second - e.second);
  B = make_pair(2 * b.first - A.first, 2 * b.second - A.second);
  C = make_pair(2 * c.first - B.first, 2 * c.second - B.second);
  D = make_pair(2 * a.first - A.first, 2 * a.second - A.second);
  return cha(A, B, C) * cha(B, C, D) - eps > 0 &&
         cha(B, C, D) * cha(C, D, A) - eps > 0 &&
         cha(C, D, A) * cha(D, A, B) - eps > 0;
}
int main() {
  int t;
  for (scanf("%d", &t); t--;) {
    scanf("%lf%lf%lf%lf%lf%lf", &a.first, &a.second, &b.first, &b.second,
          &c.first, &c.second);
    if (fabs(cha(a, b, c)) - eps < 0) {
      printf("NO\n");
      continue;
    }
    if (get(a, b, c) || get(a, c, b) || get(b, a, c)) {
      printf("YES\n");
      printf("%.9f %.9f ", A.first, A.second);
      printf("%.9f %.9f ", B.first, B.second);
      printf("%.9f %.9f ", C.first, C.second);
      printf("%.9f %.9f\n", D.first, D.second);
    } else
      printf("NO\n");
  }
  return 0;
}