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-8;
const double PI = acos(-1.0);
const int maxn = 55;
int sign(double x) { return x < -EPS ? -1 : x > EPS; }
struct TPoint {
  double x, y;
  TPoint() {}
  TPoint(double x, double y) : x(x), y(y) {}
  double len() { return sqrt(x * x + y * y); }
  int get() { return scanf("%lf%lf", &x, &y); }
  TPoint operator+(TPoint P) { return TPoint(x + P.x, y + P.y); }
  TPoint operator-(TPoint P) { return TPoint(x - P.x, y - P.y); }
  TPoint operator*(double k) { return TPoint(x * k, y * k); }
  TPoint operator/(double k) { return TPoint(x / k, y / k); }
  double operator^(TPoint P) { return x * P.y - y * P.x; }
  double operator*(TPoint P) { return x * P.x + y * P.y; }
  TPoint Rot90() { return TPoint(-y, x); }
  TPoint trunc(double k) { return (*this) / len() * k; }
  bool operator==(const TPoint P) {
    return fabs(x - P.x) < EPS && fabs(y - P.y) < EPS;
  }
  void out(char c) { printf("%.9f %.9f%c", x, y, c); }
  bool operator<(const TPoint P) const {
    if (fabs(x - P.x) < EPS) return y < P.y;
    return x < P.x;
  }
};
double cross(TPoint a, TPoint b, TPoint c) { return (b - a) ^ (c - a); }
pair<bool, TPoint> jiao(TPoint a, TPoint b, TPoint c, TPoint d) {
  double s0 = cross(a, b, c), s1 = cross(a, b, d);
  if (fabs(s0 - s1) < EPS) return make_pair(false, a);
  return make_pair(true, (c * s1 - d * s0) / (s1 - s0));
}
TPoint P[maxn];
void get() {
  int i;
  for (i = 0; i < 3; ++i) {
    P[i].get();
  }
  if (((P[1] - P[0]) ^ (P[2] - P[1])) < -EPS) swap(P[0], P[2]);
}
bool ishull(vector<TPoint> P) {
  int i;
  for (i = 0; i < 4; ++i) {
    if (sign((P[(i + 1) % 4] - P[i]) ^ (P[(i + 2) % 4] - P[(i + 1) % 4])) <= 0)
      return false;
  }
  return true;
}
vector<TPoint> hull(TPoint P[]) {
  vector<TPoint> ret;
  int i;
  for (i = 0; i < 4; ++i) ret.push_back(P[i]);
  if (ishull(ret)) return ret;
  ret.clear();
  return ret;
}
int ct;
TPoint gao(TPoint Q[], TPoint ma, TPoint O, TPoint mb) {
  double l, r, mid;
  l = 0.0;
  r = 30.0;
  int ct = 0;
  while (ct <= 40) {
    ++ct;
    mid = (l + r) * 0.5;
    TPoint now = ma + (ma - O).trunc(mid);
    TPoint pre = jiao(now, Q[0], O, mb).second;
    double lena, lenb;
    lena = (Q[0] - now).len();
    lenb = (Q[0] - pre).len();
    if (lena > lenb)
      r = mid;
    else
      l = mid;
  }
  return ma + (ma - O).trunc(mid);
}
bool gao(vector<TPoint>& cov) {
  TPoint Q[maxn];
  int i;
  for (i = 0; i < 3; ++i) Q[i] = P[i];
  ++ct;
  if (Q[0] == Q[1] || Q[0] == Q[2] || Q[1] == Q[2]) return false;
  TPoint a, b, c, d;
  a = (Q[0] + Q[1]) * 0.5;
  b = a + (Q[0] - Q[1]).Rot90();
  c = (Q[0] + Q[2]) * 0.5;
  d = c + (Q[0] - Q[2]).Rot90();
  pair<bool, TPoint> jret = jiao(a, b, c, d);
  if (!jret.first) return false;
  TPoint O = jret.second;
  TPoint Res[maxn];
  TPoint ma = (Q[0] + Q[2]) * 0.5;
  TPoint mb = (Q[0] + Q[1]) * 0.5;
  Res[0] = gao(Q, ma, O, mb);
  Res[1] = Q[0] * 2.0 - Res[0];
  Res[2] = Q[1] * 2.0 - Res[1];
  Res[3] = Q[2] * 2.0 - Res[0];
  double lena, lenb, lenc;
  lena = (Res[0] - Res[1]).len();
  lenb = (Res[0] - Res[3]).len();
  lenc = (Res[2] - Res[1]).len();
  if (sign(lena - lenb) || sign(lena - lenc) || sign(lenb - lenc)) return false;
  cov = hull(Res);
  if (cov.empty()) return false;
  return true;
}
void work() {
  bool flg = false;
  vector<TPoint> pp;
  int i;
  ct = 0;
  for (i = 0; i < 3 && !flg; ++i) {
    flg |= gao(pp);
    if (flg) break;
    rotate(P, P + 1, P + 3);
  }
  if (!flg)
    printf("NO\n\n");
  else {
    puts("YES");
    for (i = 0; i < 4; ++i) pp[i].out(i == 3 ? '\n' : ' ');
  }
}
int main() {
  int T;
  cin >> T;
  while (T--) {
    get();
    work();
  }
  return 0;
}
