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-9, INF = 1E100;
struct Point {
  double x, y;
  Point() {}
  Point(double _x, double _y) : x(_x), y(_y) {}
  inline Point operator+(Point b) { return Point(x + b.x, y + b.y); }
  inline Point operator-(Point b) { return Point(x - b.x, y - b.y); }
  inline double operator*(Point b) {
    double k = x * b.y - b.x * y;
    if (-EPS < k && k < EPS)
      return 0;
    else
      return k;
  }
  inline double operator/(Point b) { return x / b.x; }
  inline Point operator*(double k) { return Point(x * k, y * k); }
  inline Point operator/(double k) { return Point(x / k, y / k); }
  inline bool operator==(Point b) {
    return fabs(b.x - x) <= EPS && fabs(b.y - y) < EPS;
  }
  inline double Len() { return sqrt(x * x + y * y); }
  inline Point Symmetry_Point(Point b) {
    return Point(2 * b.x - x, 2 * b.y - y);
  }
} a, b, c;
inline double Dist(Point p1, Point p2) { return (p1 - p2).Len(); }
inline Point Get_Cur(Point p, double d) {
  double D = sqrt(p.x * p.x + p.y * p.y);
  return Point(d * p.x / D, d * p.y / D);
}
inline Point Get_Mid_Point(Point p1, Point p2) {
  return Point((p1.x + p2.x) / 2, (p1.y + p2.y) / 2);
}
struct Line {
  double a, b, c;
  Line() {}
  Line(Point p1, Point p2) {
    a = p1.y - p2.y, b = p2.x - p1.x, c = p1.x * p2.y - p2.x * p1.y;
  }
  Line(double _a, double _b, double _c) : a(_a), b(_b), c(_c) {}
  inline Line Get_H(Point p) { return Line(b, -a, a * p.y - b * p.x); }
};
inline bool Parallel(Line m, Line n) {
  if (fabs(m.a * n.b - m.b * n.a) < EPS)
    return true;
  else
    return false;
}
inline Point Get_Point(Line m, Line n) {
  return Point((m.c * n.b - n.c * m.b) / (n.a * m.b - m.a * n.b),
               (m.c * n.a - n.c * m.a) / (n.b * m.a - m.b * n.a));
}
inline double Dist(Point p, Line l) {
  return Dist(p, Get_Point(l, l.Get_H(p)));
}
inline double Dist(Point p, Point p1, Point p2) {
  Line l = Line(p1, p2);
  Point X = Get_Point(l, l.Get_H(p));
  if (fabs(Dist(p1, X) + Dist(p2, X) - Dist(p1, p2)) < EPS)
    return Dist(p, X);
  else
    return INF;
}
inline Line Get_Perpendicular_Bisector(Point p1, Point p2) {
  Point p3 = Get_Mid_Point(p1, p2);
  return Line(p1, p2).Get_H(p3);
}
inline Point Get_Circumcenter(Point p1, Point p2, Point p3) {
  return Get_Point(Get_Perpendicular_Bisector(p1, p2),
                   Get_Perpendicular_Bisector(p3, p1));
}
int Cas;
bool Check(Point p1, Point p2, Point p3) {
  Point p4 = p3.Symmetry_Point(p2), p5 = p1.Symmetry_Point(p2);
  Point m1 = Get_Circumcenter(p1, p2, p4), m2 = Get_Circumcenter(p3, p2, p5);
  Point m3 = m2.Symmetry_Point(p3), m4 = m1.Symmetry_Point(p1);
  if (m1 == m2 || m1 == m3 || m1 == m4 || m2 == m3 || m2 == m4 || m3 == m4)
    return false;
  double t1 = (m2 - m1) * (m3 - m1), t2 = (m3 - m2) * (m4 - m2),
         t3 = (m4 - m3) * (m1 - m3), t4 = (m1 - m4) * (m2 - m4);
  if (t1 > EPS && t2 > EPS && t3 > EPS && t4 > EPS ||
      t1 < -EPS && t2 < -EPS && t3 < -EPS && t4 < -EPS) {
    puts("YES");
    printf("%.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf\n", m1.x, m1.y,
           m2.x, m2.y, m3.x, m3.y, m4.x, m4.y);
    return true;
  }
  return false;
}
int main() {
  scanf("%d", &Cas);
  while (Cas--) {
    scanf("%lf%lf%lf%lf%lf%lf", &a.x, &a.y, &b.x, &b.y, &c.x, &c.y);
    if (a == b || b == c || a == c) {
      puts("NO");
      puts("");
      continue;
    }
    if (Check(a, b, c)) continue;
    if (Check(b, a, c)) continue;
    if (Check(a, c, b)) continue;
    puts("NO");
    puts("");
  }
}
