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 Point {
  double x, y;
  Point() {}
  Point(double x, double y) : x(x), y(y) {}
  Point vn() const { return Point(y, -x); }
} p[3], q[4];
Point operator+(const Point& lhs, const Point& rhs) {
  return Point(lhs.x + rhs.x, lhs.y + rhs.y);
}
Point operator-(const Point& lhs, const Point& rhs) {
  return Point(lhs.x - rhs.x, lhs.y - rhs.y);
}
Point operator*(const double& lhs, const Point& rhs) {
  return Point(lhs * rhs.x, lhs * rhs.y);
}
double operator/(const Point& lhs, const Point& rhs) {
  return lhs.x * rhs.y - lhs.y * rhs.x;
}
bool gao() {
  q[0] = 0.5 * (p[0] + p[1]);
  q[1] = 0.5 * (p[0] + p[2]);
  q[2] = (p[1] - p[0]).vn();
  q[3] = (p[2] - p[0]).vn();
  double a[2][3] = {{q[2].x, q[3].x, 2 * p[0].x - q[0].x - q[1].x},
                    {q[2].y, q[3].y, 2 * p[0].y - q[0].y - q[1].y}};
  double d = a[0][0] * a[1][1] - a[1][0] * a[0][1];
  double u = (a[0][2] * a[1][1] - a[1][2] * a[0][1]) / d;
  double v = (a[0][0] * a[1][2] - a[1][0] * a[0][2]) / d;
  q[0] = q[0] + u * q[2];
  q[1] = q[1] + v * q[3];
  q[2] = 2 * p[2] - q[1];
  q[3] = 2 * p[1] - q[0];
  for (int i = 0; i < 4; ++i) {
    if ((q[i] - q[(i + 1) % 4]) / (q[(i + 2) % 4] - q[(i + 1) % 4]) < EPS) {
      return false;
    }
  }
  return true;
}
int main() {
  int re;
  scanf("%d", &re);
  for (int ri = 1; ri <= re; ++ri) {
    for (int i = 0; i < 3; ++i) {
      scanf("%lf%lf", &p[i].x, &p[i].y);
    }
    if ((p[1] - p[0]) / (p[2] - p[0]) < -EPS) {
      swap(p[1], p[2]);
    }
    if ((p[1] - p[0]) / (p[2] - p[0]) > EPS) {
      for (int i = 0; i < 3; ++i) {
        if (gao()) {
          puts("YES");
          for (int i = 0; i < 4; ++i) {
            printf("%.10lf %.10lf ", q[i].x, q[i].y);
          }
          goto NEXT;
        }
        rotate(p, p + 1, p + 3);
      }
    }
    puts("NO");
  NEXT:
    puts("");
  }
  return 0;
}