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 pi = acos(-1);
const double eps = 1e-7;
const double inf = 1e14;
char typ[205];
inline double two(double x) { return x * x; }
inline int sign(double a) { return (a > eps) - (a < -eps); }
struct Point {
  double x;
  double y;
  Point() { x = 0, y = 0; }
  Point(double X, double Y) { x = X, y = Y; }
};
struct Vec {
  double x;
  double y;
  Vec() { x = 0, y = 0; }
  Vec(double X, double Y) { x = X, y = Y; }
  inline double length() { return sqrt(x * x + y * y); }
};
inline Vec operator-(Point a, Point b) { return Vec(a.x - b.x, a.y - b.y); }
inline Point operator+(Point a, Vec b) { return Point(a.x + b.x, a.y + b.y); }
inline Point operator-(Point a, Vec b) { return Point(a.x - b.x, a.y - b.y); }
inline Point operator+(Point a, Point b) { return Point(a.x + b.x, a.y + b.y); }
inline Point operator*(Point a, double b) { return Point(a.x * b, a.y * b); }
inline Point operator/(Point a, double b) { return Point(a.x / b, a.y / b); }
inline double angle(Point a) { return atan2(a.y, a.x); }
inline double angle(Vec a) { return atan2(a.y, a.x); }
inline Vec PV(Point a, Point b) { return Vec(b.x - a.x, b.y - a.y); }
inline double dist(Point a, Point b) { return PV(a, b).length(); }
inline Vec operator+(Vec a, Vec b) { return Vec(a.x + b.x, a.y + b.y); }
inline Vec operator-(Vec a, Vec b) { return Vec(a.x - b.x, a.y - b.y); }
inline Vec operator*(Vec a, double b) { return Vec(a.x * b, a.y * b); }
inline Vec operator*(double a, Vec b) { return Vec(b.x * a, b.y * a); }
inline Vec operator/(Vec a, double b) { return Vec(a.x / b, a.y / b); }
inline double operator*(Vec a, Vec b) { return a.x * b.x + a.y * b.y; }
inline double operator^(Vec a, Vec b) { return a.x * b.y - a.y * b.x; }
inline bool operator<(Point a, Point b) {
  if ((Vec(b - Point(0, 0)) ^ Vec(a - Point(0, 0))) > 0) return true;
  return false;
}
inline Vec unit(Vec a) { return a * (1.0 / a.length()); }
inline double project(Vec a, Vec b) { return a * unit(b); }
inline Point rotate(Point a, Point b, double dir) {
  Vec p = b - a;
  return Point(a.x + (p.x * cos(dir) - p.y * sin(dir)),
               a.y + (p.x * sin(dir) + p.y * cos(dir)));
}
inline bool ver(Vec a, Vec b) { return ((a * b) == 0); }
inline Vec Ver(Vec a) { return Vec(-a.y, a.x); }
inline bool place(Vec a, Vec b) { return sign(a ^ b); }
struct Line {
  Point x;
  Point y;
  Line() { x = Point(0, 0), y = Point(0, 0); }
  Line(Point X, Point Y) { x = X, y = Y; }
  inline Point mid() { return Point((x.x + y.x) / 2, (x.y + y.y) / 2); }
  inline int side(Point a) { return sign((y - x) ^ (a - x)); }
};
inline double dist(Point a, Line b) {
  return fabs((a - b.x) ^ (a - b.y)) / (PV(b.x, b.y).length());
}
inline Line Ver(Point a, Line b) {
  return Line(a, a + (rotate(b.x, b.y, pi / 2) - b.x));
}
inline Line midVer(Line a) { return Ver(a.mid(), a); }
inline double angle(Line a, Line b) {
  return acos(fabs(project(a.y - a.x, b.y - b.x) / (a.y - a.x).length()));
}
inline Point inter(Line a, Line b) {
  double x = (b.x - a.x) ^ (a.y - a.x);
  double y = (a.y - a.x) ^ (b.y - a.x);
  if (sign(x + y) == 0) return Point(inf, inf);
  return b.x + (b.y - b.x) * (x / (x + y));
}
inline Point foot(Point a, Line b) {
  return b.x + project(a - b.x, b.y - b.x) * unit(b.y - b.x);
}
inline Point sym(Point a, Point b) {
  return Point(2 * b.x - a.x, 2 * b.y - a.y);
}
inline Point sym(Point a, Line b) { return sym(a, foot(a, b)); }
struct Circle {
  Point center;
  double r;
  Circle() { center = Point(0, 0), r = 0; }
  Circle(Point C, double R) { center = C, r = R; }
  inline int in(Point a) {
    double dis = dist(a, center);
    return sign(r - dis);
  }
};
void out(Point a) {
  cout << " Point: "
       << " x=" << a.x << " y=" << a.y << endl;
}
void out(Vec a) {
  cout << " Vec: "
       << " x=" << a.x << " y=" << a.y << endl;
}
void out(Line a) {
  cout << " Line:" << endl;
  out(a.x);
  out(a.y);
}
void out(Circle a) {
  cout << " Circle: " << endl;
  out(a.center);
  cout << " r=" << a.r << endl;
}
inline double read() {
  char c = getchar();
  int dat = 0;
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9') {
    dat = (dat << 3) + (dat << 1) + c - '0';
    c = getchar();
  }
  return dat;
}
inline void foottest() {
  Point a = Point(0, 2);
  Line b = Line(Point(-1, -1), Point(10, 10));
  Point ans = foot(a, b);
  cout << ans.x << " " << ans.y << endl;
}
inline void unittest() {
  Vec ans = Vec(3, 4);
  ans = unit(ans);
  cout << ans.x << " " << ans.y << endl;
}
inline void Vervectest() {
  Vec a = Vec(6, 8);
  Vec b = Ver(a);
  cout << ver(a, b) << endl;
}
inline void intertest() {
  Line a = Line(Point(0, 0), Point(1, 1)), b = Line(Point(0, 2), Point(2, 0));
  Point ans = inter(a, b);
  out(ans);
}
inline void angletest() {
  Line a = Line(Point(0, 0), Point(1, 1)), b = Line(Point(0, 2), Point(2, 0));
  double ans = angle(a, b);
  cout << ans << endl;
}
inline void rotatetest() {
  Point a = Point(0, 0), b = Point(1, 0);
  Point ans = rotate(a, b, pi / 2);
  out(ans);
}
inline void Line_sidetest() {
  Line a = Line(Point(0, 0), Point(2, 0));
  cout << a.side(Point(1, 1)) << " " << a.side(Point(1, 0)) << " "
       << a.side(Point(1, -1)) << endl;
}
int T;
inline bool judge(Point a, Point b, Point c) {
  Point sc = sym(c, b);
  Point B = inter(midVer(Line(sc, b)), midVer(Line(a, b)));
  Point A = sym(B, a), C = sym(B, b);
  Point D = sym(C, c);
  Line AC = Line(A, C), BD = Line(B, D);
  if (AC.side(B) != 0 && (AC.side(B) + AC.side(D)) == 0 && BD.side(A) != 0 &&
      (BD.side(A) + BD.side(C)) == 0) {
    printf("YES\n");
    printf("%.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf\n", A.x, A.y, B.x,
           B.y, C.x, C.y, D.x, D.y);
    return true;
  } else {
    return false;
  }
}
void solve() {
  Point a, b, c, d;
  a.x = read(), a.y = read(), b.x = read(), b.y = read(), c.x = read(),
  c.y = read();
  if (judge(a, b, c))
    return;
  else if (judge(a, c, b))
    return;
  else if (judge(b, a, c))
    return;
  else if (judge(b, c, a))
    return;
  else if (judge(c, a, b))
    return;
  else if (judge(c, b, a))
    return;
  printf("NO\n");
  printf("\n");
  return;
}
int main() {
  scanf("%d", &T);
  for (int i = 1; i <= T; i++) {
    solve();
  }
  return 0;
}
