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;
pair<int, int> p[4];
double distsq(double x1, double ooox, double x2, double y2) {
  double dx = x1 - x2, dy = ooox - y2;
  return dx * dx + dy * dy;
}
template <typename T>
T det(T x1, T ooox, T x2, T y2) {
  return x1 * y2 - x2 * ooox;
}
template <typename T>
T turn(T x1, T ooox, T x2, T y2, T x3, T y3) {
  return det(x2 - x1, y2 - ooox, x3 - x2, y3 - y2);
}
double getDist(double d) {
  double ax = (p[1].first + p[2].first) * .5;
  double ay = (p[1].second + p[2].second) * .5;
  ax += d * (p[2].second - p[1].second);
  ay -= d * (p[2].first - p[1].first);
  double bx = 2 * p[2].first - ax;
  double by = 2 * p[2].second - ay;
  double d2 = distsq(bx, by, p[2].first, p[2].second);
  double d3 = distsq(bx, by, p[3].first, p[3].second);
  return d2 - d3;
}
bool solve(double l) {
  if (abs(getDist(l)) > 1e-9) {
    return false;
  }
  vector<pair<double, double> > ans;
  ans.push_back(make_pair(
      (p[1].first + p[2].first) * .5 + l * (p[2].second - p[1].second),
      (p[1].second + p[2].second) * .5 - l * (p[2].first - p[1].first)));
  ans.push_back(make_pair(2 * p[2].first - ans[0].first,
                          2 * p[2].second - ans[0].second));
  ans.push_back(make_pair(2 * p[3].first - ans[1].first,
                          2 * p[3].second - ans[1].second));
  ans.insert(ans.begin(), make_pair(2 * p[1].first - ans[0].first,
                                    2 * p[1].second - ans[0].second));
  int t = -1;
  for (int i = (0); i <= (3); i++) {
    double tu = turn(ans[i].first, ans[i].second, ans[i + 1 & 3].first,
                     ans[i + 1 & 3].second, ans[i + 2 & 3].first,
                     ans[i + 2 & 3].second);
    if (abs(tu) < 1e-9) {
      return false;
    }
    bool cur = tu > 0;
    if (t == -1) {
      t = cur;
    } else if (t != cur) {
      return false;
    }
  }
  printf("YES\n");
  for (auto p : ans) {
    printf("%.12g %.12g ", p.first, p.second);
  }
  printf("\n");
  return true;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t;
  scanf("%d", &t);
  while (t--) {
    for (int i = (1); i <= (3); i++) {
      scanf("%d %d", &(p[i].first), &(p[i].second));
    }
    if (turn(p[1].first, p[1].second, p[2].first, p[2].second, p[3].first,
             p[3].second) == 0) {
      printf("NO\n\n");
      continue;
    }
    sort(p + 1, p + 4);
    bool found = false;
    do {
      double l = -1e4, r = 1e4;
      double ld = l, rd = r;
      for (int i = (1); i <= (70); i++) {
        double m = (l + r) / 2;
        double dm = getDist(m);
        if (dm > 0) {
          r = m;
        } else {
          l = m;
        }
        double md = (ld + rd) / 2;
        double dmd = getDist(md);
        if (dmd > 0) {
          ld = md;
        } else {
          rd = md;
        }
      }
      if (solve(l)) {
        found = true;
        break;
      }
      if (solve(ld)) {
        found = true;
        break;
      }
    } while (next_permutation(p + 1, p + 4));
    if (!found) {
      printf("NO\n\n");
    }
  }
  return 0;
}
