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;
struct Point {
  double x, y;
} p[50], aa[3], ans[4];
double Cross(Point p1, Point p2, Point p3, Point p4) {
  double x1 = p2.x - p1.x, y1 = p2.y - p1.y;
  double x2 = p4.x - p3.x, y2 = p4.y - p3.y;
  return x1 * y2 - x2 * y1;
}
bool On_Segment(Point p1, Point p2, Point p3) {
  if (Cross(p1, p2, p1, p3) != 0) return false;
  bool iny = (p1.y <= p3.y && p3.y <= p2.y) || (p1.y >= p3.y && p3.y >= p2.y);
  bool inx = (p1.x <= p3.x && p3.x <= p2.x) || (p1.x >= p3.x && p3.x >= p2.x);
  if (inx && iny) return true;
  return false;
}
bool Segmentintersect(Point p1, Point p2, Point p3, Point p4) {
  double cross_1 = Cross(p3, p4, p3, p1), cross_2 = Cross(p3, p4, p3, p2);
  double cross_3 = Cross(p1, p2, p1, p3), cross_4 = Cross(p1, p2, p1, p4);
  if (cross_1 * cross_2 < 0 && cross_3 * cross_4 < 0) return true;
  return false;
}
double Abs(double x) { return x > 0 ? x : -x; }
bool equal(double a, double b) { return Abs(a - b) < 1e-8; }
Point dui(Point xx, Point yy) {
  Point now;
  now.x = 2 * yy.x - xx.x;
  now.y = 2 * yy.y - xx.y;
  return now;
}
double dis(Point xx, Point yy) {
  return sqrt((xx.x - yy.x) * (xx.x - yy.x) + (xx.y - yy.y) * (xx.y - yy.y));
}
Point hehe(Point a, Point b, Point c) {
  Point now;
  double a1 = b.x - a.x, b1 = b.y - a.y, c1 = (a1 * a1 + b1 * b1) / 2;
  double a2 = c.x - a.x, b2 = c.y - a.y, c2 = (a2 * a2 + b2 * b2) / 2;
  double d = a1 * b2 - a2 * b1;
  now.x = a.x + (c1 * b2 - c2 * b1) / d;
  now.y = a.y + (a1 * c2 - a2 * c1) / d;
  return now;
}
bool gongxian(Point a, Point b, Point c) {
  if (!(equal((b.x + c.x) / 2.0, a.x) && equal((b.y + c.y) / 2.0, a.y)))
    swap(a, b);
  if (!(equal((b.x + c.x) / 2.0, a.x) && equal((b.y + c.y) / 2.0, a.y)))
    return false;
  return equal(dis(a, b), dis(a, c));
}
bool work(Point a, Point b, Point c) {
  if (gongxian(a, b, c)) return false;
  Point bb = dui(b, a);
  if (gongxian(a, bb, c)) return false;
  ans[1] = hehe(a, bb, c);
  ans[2] = dui(ans[1], a);
  ans[3] = dui(ans[2], b);
  ans[0] = dui(ans[1], c);
  return Segmentintersect(ans[1], ans[3], ans[0], ans[2]);
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    for (int i = 0; i < 3; i++) scanf("%lf %lf", &aa[i].x, &aa[i].y);
    if (work(aa[0], aa[1], aa[2]) || work(aa[1], aa[0], aa[2]) ||
        work(aa[2], aa[1], aa[0])) {
      puts("YES");
      for (int i = 0; i < 4; i++) {
        printf("%.10lf %.10lf", ans[i].x, ans[i].y);
        if (i == 3)
          puts("");
        else
          printf(" ");
      }
    } else
      puts("NO"), puts("");
  }
  return 0;
}