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;
};
Point operator-(const Point &i, const Point &j) {
  Point ret = {i.x - j.x, i.y - j.y};
  return ret;
}
double det(const Point &i, const Point &j) { return i.x * j.y - i.y * j.x; }
bool F(Point p1, Point p2, Point p3) {
  p1.x -= p2.x;
  p1.y -= p2.y;
  p3.x -= p2.x;
  p3.y -= p2.y;
  double a1 = -2 * p1.x, b1 = -2 * p1.y,
         c1 = ((p1.x) * (p1.x)) + ((p1.y) * (p1.y));
  double a2 = 2 * p3.x, b2 = 2 * p3.y,
         c2 = ((p3.x) * (p3.x)) + ((p3.y) * (p3.y));
  double t = a1 * b2 - a2 * b1;
  if (fabs(t) < 1e-13) return 0;
  Point q3 = {(c1 * b2 - c2 * b1) / t, (a1 * c2 - a2 * c1) / t},
        q2 = {-q3.x, -q3.y};
  Point q1 = {p1.x * 2 - q2.x, p1.y * 2 - q2.y},
        q4 = {p3.x * 2 - q3.x, p3.y * 2 - q3.y};
  if (fabs(det(q3 - q1, q2 - q1)) < 1e-13) return 0;
  if (fabs(det(q4 - q2, q3 - q2)) < 1e-13) return 0;
  if (fabs(det(q1 - q3, q4 - q3)) < 1e-13) return 0;
  if (fabs(det(q2 - q4, q1 - q4)) < 1e-13) return 0;
  if (det(q3 - q1, q2 - q1) * det(q4 - q1, q2 - q1) < 0) return 0;
  if (det(q4 - q2, q3 - q2) * det(q1 - q2, q3 - q2) < 0) return 0;
  if (det(q1 - q3, q4 - q3) * det(q2 - q3, q4 - q3) < 0) return 0;
  if (det(q2 - q4, q1 - q4) * det(q3 - q4, q1 - q4) < 0) return 0;
  printf("YES\n%.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf %.9lf \n", q1.x + p2.x,
         q1.y + p2.y, q2.x + p2.x, q2.y + p2.y, q3.x + p2.x, q3.y + p2.y,
         q4.x + p2.x, q4.y + p2.y);
  return 1;
}
int main_() {
  Point p1, p2, p3;
  scanf("%lf%lf", &p1.x, &p1.y);
  scanf("%lf%lf", &p2.x, &p2.y);
  scanf("%lf%lf", &p3.x, &p3.y);
  if (F(p1, p2, p3)) return 0;
  if (F(p2, p1, p3)) return 0;
  if (F(p2, p3, p1)) return 0;
  printf("NO\n\n");
  return 0;
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) main_();
  return 0;
}