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 point {
  double x, y, z;
  point() { x = 0, y = 0, z = 0; }
  point(double _x, double _y, double _z) { x = _x, y = _y, z = _z; }
  double len();
};
int tt;
point operator*(const point &a, double p) {
  return point(a.x * p, a.y * p, a.z * p);
}
point operator*(double p, const point &a) {
  return point(a.x * p, a.y * p, a.z * p);
}
point operator+(const point &a, const point &b) {
  return point(a.x + b.x, a.y + b.y, a.z + b.z);
}
point operator-(const point &a, const point &b) {
  return point(a.x - b.x, a.y - b.y, a.z - b.z);
}
point operator+=(point &a, const point &b) {
  a = a + b;
  return a;
}
point operator-=(point &a, const point &b) {
  a = a - b;
  return a;
}
point operator*=(point &a, int p) {
  a = a * p;
  return a;
}
double point::len() { return sqrt(x * x + y * y + z * z); }
double dist(const point &a, const point &b) { return (a - b).len(); }
point cross(const point &a, const point &b) {
  return point(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z,
               a.x * b.y - a.y * b.x);
}
double dot(const point &a, const point &b) {
  return a.x * b.x + a.y * b.y + a.z * b.z;
}
int chira(const point &a, const point &b) {
  double c = cross(a, b).z;
  if (c > 1e-9) return 1;
  if (c < -1e-9) return -1;
  return 0;
}
bool check(const point &a, const point &b, const point &c, const point &d) {
  int aa = chira(b - a, c - a), bb = chira(c - b, d - b),
      cc = chira(d - c, a - c), dd = chira(a - d, b - d);
  if (aa != bb || bb != cc || cc != dd) return false;
  return true;
}
bool ava(point a, point b, point c) {
  point d = 2 * b - c;
  swap(d, c);
  double aa = dist(b, c), bb = dist(a, c), cc = dist(a, b);
  double area = fabs(cross(b - a, c - a).z) / 2;
  if (area < 1e-9) return false;
  point ae =
      bb * bb * (cc * cc + aa * aa - bb * bb) / 16 / area / area * (b - a);
  ae += cc * cc * (aa * aa + bb * bb - cc * cc) / 16 / area / area * (c - a);
  point p1 = ae + a;
  point p2 = 2 * b - p1;
  point p3 = 2 * d - p2;
  point p4 = 2 * a - p1;
  if (check(p1, p2, p3, p4)) {
    printf("YES\n");
    printf("%.10lf %.10lf %.10lf %.10lf ", p1.x, p1.y, p2.x, p2.y);
    printf("%.19lf %.10lf %.10lf %.10lf\n", p3.x, p3.y, p4.x, p4.y);
    return true;
  }
  return false;
}
int main() {
  scanf("%d", &tt);
  while (tt--) {
    point a, b, c;
    scanf("%lf%lf", &a.x, &a.y);
    scanf("%lf%lf", &b.x, &b.y);
    scanf("%lf%lf", &c.x, &c.y);
    if (ava(a, b, c)) continue;
    if (ava(a, c, b)) continue;
    if (ava(b, a, c)) continue;
    if (ava(b, c, a)) continue;
    if (ava(c, a, b)) continue;
    if (ava(c, b, a)) continue;
    printf("NO\n\n");
  }
}
