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;
double eps = 1e-9;
double pi = 3.14159265358979323846264338327950288419716939937510;
struct Point {
  double x, y;
};
Point operator+(const Point& p1, const Point& p2) {
  return Point{p1.x + p2.x, p1.y + p2.y};
}
Point operator-(const Point& p1, const Point& p2) {
  return Point{p1.x - p2.x, p1.y - p2.y};
}
Point operator*(double d, const Point& p1) { return Point{p1.x * d, p1.y * d}; }
Point operator-(const Point& p) { return Point{-p.x, -p.y}; }
struct Line {
  double a, b, c;
  Line(const Point& p1, const Point& p2);
};
Line::Line(const Point& p1, const Point& p2) {
  if (std::abs(p1.x - p2.x) < eps) {
    this->a = 1.0;
    this->b = 0.0;
    this->c = -p1.x;
  } else {
    this->a = -(p2.y - p1.y) / (p2.x - p1.x);
    this->b = 1.0;
    this->c = -(a * p1.x) - (b * p1.y);
  }
}
std::ostream& operator<<(std::ostream& str, const Point& p) {
  std::cout << "(" << p.x << ", " << p.y << ")";
  return str;
}
std::ostream& operator<<(std::ostream& str, const Line& l) {
  std::cout << "Line: " << l.a << "x + " << l.b << "y + " << l.c << " = 0";
  return str;
}
bool parallel(const Line& l1, const Line& l2) {
  return (std::abs(l1.a - l2.a) < eps) && (std::abs(l1.b - l2.b) < eps);
}
bool operator==(const Line& l1, const Line& l2) {
  return parallel(l1, l2) && (std::abs(l1.c - l2.c) < eps);
}
bool intersect(const Line& l1, const Line& l2, Point& p) {
  if (parallel(l1, l2)) {
    return false;
  }
  p.x = (l1.c * l2.b - l1.b * l2.c) / (l1.b * l2.a - l1.a * l2.b);
  if (std::abs(l1.b) > eps)
    p.y = -(l1.a * p.x + l1.c) / l1.b;
  else
    p.y = -(l2.a * p.x + l2.c) / l2.b;
  return true;
}
double cross(const Point& p1, const Point& p2) {
  return p1.x * p2.y - p1.y * p2.x;
}
bool collinear(const Point& p1, const Point& p2, const Point& p3) {
  return abs(cross(p2 - p1, p3 - p1)) < eps;
}
int ccw(const Point& p1, const Point& p2, const Point& p3) {
  double c = cross(p2 - p1, p3 - p1);
  if (fabs(c) < eps)
    return 0;
  else if (c < 0)
    return 1;
  else
    return -1;
}
bool check(Point p1, Point p2, Point p3, vector<Point>& res) {
  if (collinear(p1, p2, p3)) return false;
  Point direct12 = p2 - p1;
  Point mid12 = p1 + 0.5 * direct12;
  Point normal12{-direct12.y, direct12.x};
  Line axis12(mid12, mid12 + normal12);
  Point direct13 = p3 - p1;
  Point antimid13 = p1 - 0.5 * direct13;
  Point normal13{-direct13.y, direct13.x};
  Line mirror13(antimid13, antimid13 + normal13);
  Point corner1;
  if (!intersect(axis12, mirror13, corner1)) return false;
  Point corner2 = p1 + (p1 - corner1);
  Point corner3 = p3 + (p3 - corner2);
  Point corner4 = p2 + (p2 - corner1);
  auto s1 = ccw(corner1, corner2, corner3);
  auto s2 = ccw(corner2, corner3, corner4);
  auto s3 = ccw(corner3, corner4, corner1);
  auto s4 = ccw(corner4, corner1, corner2);
  if (s1 == 0 || s2 == 0 || s3 == 0 || s4 == 0) return false;
  if (s1 != s2 || s2 != s3 || s3 != s4) return false;
  res[0] = corner1;
  res[1] = corner2;
  res[2] = corner3;
  res[3] = corner4;
  return true;
}
int main() {
  int t;
  scanf("%d\n", &t);
  std::vector<Point> res(4);
  for (size_t i = 0; i < t; ++i) {
    int x1, x2, x3, y1, y2, y3;
    scanf("%d %d %d %d %d %d\n", &x1, &y1, &x2, &y2, &x3, &y3);
    Point p1, p2, p3;
    p1.x = x1;
    p1.y = y1;
    p2.x = x2;
    p2.y = y2;
    p3.x = x3;
    p3.y = y3;
    if (check(p1, p2, p3, res) || check(p2, p1, p3, res) ||
        check(p3, p1, p2, res)) {
      printf("YES\n%.9f %.9f %.9f %.9f %.9f %.9f %.9f %.9f\n", res[0].x,
             res[0].y, res[1].x, res[1].y, res[2].x, res[2].y, res[3].x,
             res[3].y);
    } else {
      printf("NO\n\n");
    }
  }
}
