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
#include <bits/stdc++.h>
using namespace std;
struct Vec {
  double x, y;
  Vec(double a, double b) : x(a), y(b) {}
  Vec() : x(0.0), y(0.0) {}
};
Vec operator+(Vec a, Vec b) { return Vec(a.x + b.x, a.y + b.y); }
Vec operator-(Vec a, Vec b) { return Vec(a.x - b.x, a.y - b.y); }
Vec operator*(double k, Vec a) { return Vec(k * a.x, k * a.y); }
Vec operator/(Vec a, double k) { return Vec(a.x / k, a.y / k); }
double operator^(Vec a, Vec b) { return a.x * b.y - a.y * b.x; }
double operator*(Vec a, Vec b) { return a.x * b.x + a.y * b.y; }
ostream& operator<<(ostream& s, Vec a) {
  s << "(" << a.x << ", " << a.y << ")";
  return s;
}
double norm2(Vec a) { return a * a; }
double norm(Vec a) { return sqrt(norm2(a)); }
double dist2(Vec a, Vec b) { return (a - b) * (a - b); }
double dist(Vec a, Vec b) { return sqrt(dist2(a, b)); }
Vec unit(Vec a) { return a / norm(a); }
Vec rot90_ccw(Vec a) { return Vec(-a.y, a.x); }
Vec rot_ccw(Vec a, double r) {
  return Vec(a.x * cos(r) - a.y * sin(r), a.x * sin(r) + a.y * cos(r));
}
double angle_between(Vec a, Vec b) { return acos(a * b / norm(a) / norm(b)); }
const double EPS = 1e-8;
pair<Vec, Vec> perpendicular_bisector(Vec a, Vec b) {
  return make_pair((a + b) / 2.0, rot90_ccw(a - b));
}
pair<int, Vec> lines_intersection(Vec p1, Vec v1, Vec p2, Vec v2) {
  if (abs(v1 ^ v2) < EPS)
    return make_pair(abs((p2 - p1) ^ v1) < EPS ? -1 : 0, Vec());
  double t = ((p1.y - p2.y) * v2.x + (p2.x - p1.x) * v2.y) / (v1 ^ v2);
  return make_pair(1, p1 + t * v1);
}
vector<Vec> restore_tetragon(vector<Vec> cs) {
  assert(cs.size() == 3);
  for (int mid = 0; mid < 3; ++mid) {
    rotate(cs.begin(), cs.begin() + 1, cs.end());
    pair<Vec, Vec> b1 = perpendicular_bisector(cs[0], cs[1]);
    pair<Vec, Vec> b2 = perpendicular_bisector(cs[0], cs[2]);
    b1.first = b1.first - cs[0];
    b2.first = cs[0] - b2.first;
    pair<int, Vec> inters =
        lines_intersection(b1.first, b1.second, b2.first, b2.second);
    if (inters.first != 1) continue;
    Vec p1 = inters.second + cs[0];
    vector<Vec> ps;
    ps.push_back(p1 + 2.0 * (cs[1] - p1));
    ps.push_back(p1);
    ps.push_back(p1 + 2.0 * (cs[0] - p1));
    ps.push_back(ps.back() + 2.0 * (cs[2] - ps.back()));
    bool ok = true;
    vector<double> cps;
    for (int i = 0; i < 4; ++i) {
      cps.push_back((ps[(i + 1) % 4] - ps[i]) ^
                    (ps[(i + 2) % 4] - ps[(i + 1) % 4]));
    }
    for (int i = 0; i < 4 && ok; ++i) {
      if (abs(cps[i]) < EPS)
        ok = false;
      else if (cps[i] * cps[(i + 1) % 4] < 0.0)
        ok = false;
    }
    if (ok) return ps;
  }
  return vector<Vec>();
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.setf(ios::fixed);
  cout.precision(9);
  int t;
  scanf("%d", &t);
  for (; t > 0; --t) {
    vector<Vec> cs(3);
    for (int i = 0; i < 3; ++i) {
      int x, y;
      scanf("%d %d", &x, &y);
      cs[i].x = double(x);
      cs[i].y = double(y);
    }
    vector<Vec> sol = restore_tetragon(cs);
    if (sol.size() == 4) {
      printf("YES\n");
      for (int i = 0; i < 4; ++i) {
        if (i > 0) printf(" ");
        printf("%.9f %.9f", sol[i].x, sol[i].y);
      }
      printf("\n");
    } else {
      printf("NO\n\n");
    }
  }
}
