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 int Maxn = 1000 + 10;
const int INF = 0x7f7f7f7f;
const double eps = 1e-10;
const double pi = acos(-1.0);
inline int compareTo(double a, double b) {
  return (a > b + eps) ? 1 : ((a + eps < b) ? -1 : 0);
}
class Point {
 public:
  double x, y;
  Point(double x1 = 0, double y1 = 0) : x(x1), y(y1) {}
  Point symmetricPoint(Point &p) { return Point(2 * p.x - x, 2 * p.y - y); }
  double dist(Point &p) {
    return sqrt((x - p.x) * (x - p.x) + (y - p.y) * (y - p.y));
  }
};
double Cross(Point A, Point B, Point C) {
  return (B.x - A.x) * (C.y - A.y) - (C.x - A.x) * (B.y - A.y);
}
class Triangle {
 public:
  Point p[3];
  Triangle() {}
  Triangle(Point t1, Point t2, Point t3) {
    p[0] = t1;
    p[1] = t2;
    p[2] = t3;
  }
  Point circumCircle() {
    Point cntr;
    double c1 = (p[0].x * p[0].x + p[0].y * p[0].y - p[1].x * p[1].x -
                 p[1].y * p[1].y) /
                2;
    double c2 = (p[0].x * p[0].x + p[0].y * p[0].y - p[2].x * p[2].x -
                 p[2].y * p[2].y) /
                2;
    cntr.x = (c1 * (p[0].y - p[2].y) - c2 * (p[0].y - p[1].y)) /
             ((p[0].x - p[1].x) * (p[0].y - p[2].y) -
              (p[0].x - p[2].x) * (p[0].y - p[1].y));
    cntr.y = (c1 * (p[0].x - p[2].x) - c2 * (p[0].x - p[1].x)) /
             ((p[0].y - p[1].y) * (p[0].x - p[2].x) -
              (p[0].y - p[2].y) * (p[0].x - p[1].x));
    return cntr;
  }
};
class Polygon {
 public:
  vector<Point> p;
  Polygon() {}
  bool checkConvex() {
    int n = ((int)(p).size());
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        if (i != j && (i + 1) % n != j &&
            compareTo(Cross(p[i], p[(i + 1) % n], p[j]), 0) <= 0)
          return false;
    return true;
  }
};
bool solve(Point p1, Point p2, Point p3) {
  Point p33 = p3.symmetricPoint(p2);
  Point B = (new Triangle(p1, p2, p33))->circumCircle();
  Point A = B.symmetricPoint(p1);
  Point C = B.symmetricPoint(p2);
  Point D = C.symmetricPoint(p3);
  Polygon poly;
  poly.p.push_back(A);
  poly.p.push_back(B);
  poly.p.push_back(C);
  poly.p.push_back(D);
  if (poly.checkConvex()) {
    printf("YES\n");
    for (int i = 0; i < 4; i++) printf("%.9f %.9f ", poly.p[i].x, poly.p[i].y);
    printf("\n");
    return true;
  }
  return false;
}
int main() {
  int T;
  Point p1, p2, p3;
  ios::sync_with_stdio(0);
  cin >> T;
  while (T--) {
    cin >> p1.x >> p1.y >> p2.x >> p2.y >> p3.x >> p3.y;
    if (solve(p1, p2, p3) || solve(p3, p2, p1) || solve(p2, p1, p3) ||
        solve(p3, p1, p2) || solve(p1, p3, p2) || solve(p2, p3, p1))
      ;
    else
      printf("NO\n\n");
  }
  return 0;
}