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;
const double EPS = 1e-12;
inline int cmp(double x, double y = 0) {
  return (x <= y + EPS) ? (x + EPS < y) ? -1 : 0 : 1;
}
bool errorFlag;
struct Point {
  double x, y;
  Point add(Point p) { return Point(x + p.x, y + p.y); }
  Point multiply(double m) { return Point(x * m, y * m); }
  Point subtract(Point p) { return Point(x - p.x, y - p.y); }
  Point perp() { return Point(-y, x); }
  double crossProduct(Point p) { return x * p.y - y * p.x; }
  Point() {}
  Point(double x, double y) : x(x), y(y) {}
};
bool operator<(const Point& p0, const Point& p1) {
  if (p0.x != p1.x) return p0.x < p1.x;
  return p0.y < p1.y;
}
struct Line {
  Point s, d;
  Point pointAt(double x) { return s.add(d.multiply(x)); }
  Line perpBisector() { return Line(pointAt(0.5), d.perp()); }
  Line(Point s, Point d) : s(s), d(d) {}
  Line() {}
};
Point intersection(Line A, Line B) {
  double den = A.d.crossProduct(B.d);
  if (cmp(den) == 0) {
    errorFlag = true;
    return Point();
  }
  double num = B.s.crossProduct(B.d) - A.s.crossProduct(B.d);
  return A.pointAt(num / den);
}
struct Triangle {
  Point a, b, c;
  Point circuncenter() {
    Line ab = Line(a, b.subtract(a));
    Line ac = Line(a, c.subtract(a));
    Line abPerp = ab.perpBisector();
    Line acPerp = ac.perpBisector();
    Point r = intersection(abPerp, acPerp);
    return r;
  }
  Triangle(Point a, Point b, Point c) : a(a), b(b), c(c) {}
  Triangle() {}
};
bool strictlyConvex(Point p0, Point p1, Point p2, Point p3) {
  int wanted = 0, aux;
  Point pol[] = {p0, p1, p2, p3};
  for (int i = 0; i < 4; ++i) {
    Point v1 = pol[(i + 1) % 4].subtract(pol[i]);
    Point v2 = pol[(i + 2) % 4].subtract(pol[i]);
    aux = cmp(v1.crossProduct(v2));
    if (aux == 0) return false;
    if (wanted == 0)
      wanted = aux;
    else if (wanted != aux)
      return false;
  }
  return true;
}
int main() {
  int ntests;
  scanf("%d", &ntests);
  while (ntests--) {
    Point m[3];
    for (int i = 0; i < 3; ++i) scanf("%lf %lf", &m[i].x, &m[i].y);
    bool answerFound = false;
    Point answer[4];
    sort(m, m + 3);
    do {
      Point mAB = m[0];
      Point mBC = m[1];
      Point mCD = m[2];
      Point mCD1 = (Line(mCD, mBC.subtract(mCD))).pointAt(2.0);
      errorFlag = false;
      Point B = (Triangle(mAB, mCD1, mBC)).circuncenter();
      Point A = (Line(B, mAB.subtract(B))).pointAt(2.0);
      Point C = (Line(B, mBC.subtract(B))).pointAt(2.0);
      Point D = (Line(C, mCD.subtract(C))).pointAt(2.0);
      if (errorFlag) continue;
      if (!strictlyConvex(A, B, C, D)) continue;
      answerFound = true;
      answer[0] = A, answer[1] = B;
      answer[2] = C, answer[3] = D;
    } while (next_permutation(m, m + 3));
    if (!answerFound)
      printf("NO\n\n");
    else {
      printf("YES\n");
      for (int i = 0; i < 4; ++i) {
        if (i) printf(" ");
        printf("%.9lf %.9lf", answer[i].x, answer[i].y);
      }
      printf("\n");
    }
  }
  return 0;
}
