Problem: The Cybermen have again outwitted the Daleks! Unfortunately, this time the Daleks decided to abandon these tasks altogether, which means the Doctor has to deal with them.

The Doctor can handle the Daleks on his own, but Heidi now has to make sure that the Cybermen are kept busy with this next task.

There are k rings on a plane. For each ring, n points are uniformly sampled with a small random noise. The task is to recover the rings given only the noisy samples.

The rings and the samples are generated as follows. The center of a ring is uniformly sampled from a disk of radius 1 000 000 centered at the origin, and the radius of the ring is uniformly sampled from [250 000, 750 000]. Let R be a ring with center (x, y) and radius r. To sample a point from R, an angle θ is uniformly sampled from [0, 2π] and a distance d is uniformly sampled from [0.9r, 1.1r]. The coordinates of the sampled point are then (x+dcos(θ), y+dsin(θ)) rounded to the closest integers.

The distance between rings is measured by their Hausdorff distance. In our case, the distance between two rings R_1, R_2 can be written as follow. Let d be the distance between the two centers and r_1, r_2 be the radii. Then the distance is $$$dist(R_1, R_2)=max(min(d_{--}, d_{-+}),min(d_{+-}, d_{++}), min(d_{--}, d_{+-}), min(d_{-+}, d_{++})), where d_{++}=|d+r_1+r_2|, d_{+-}=|d+r_1-r_2|, d_{-+}=|d-r_1+r_2|, d_{--}=|d-r_1-r_2|$$$.

We say that a ring R_0 is recovered if one of the rings R in the output has Hausdorff distance less than 100 000 from R_0. 

An output is accepted if all the rings are recovered. It is guaranteed that the distances between any two rings is greater than 600 000.

Remember that a human can very easily solve this task, so make sure that no human traitors are helping the Cybermen complete this task.

Input

The first line contains an integer k (1 ≤ k ≤ 4), the number of rings.

The second line contains an integer n (100 ≤ n ≤ 1 000), the number of samples per ring.

The following n × k lines contain the samples, one sample per line.

Each line contains a pair of integers x_i, y_i, where (x_i, y_i) are the coordinates of the i-th sample.

Output

Print k lines, each describing a single ring.

For each line, print three real numbers x_i, y_i, r_i, where (x_i, y_i) and r_i are the coordinates and the radius of the i-th ring.

The order of the rings does not matter.

Note

Here is how one of tests with k=4 and n=100 looks like. 

<image>

You can download the sample input and output [here](//assets.codeforces.com/rounds/1184/c1.zip).

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int k, n, N;
struct pnt {
  double x, y;
  pnt() {}
  pnt(double a, double b) {
    x = a;
    y = b;
  }
} p[2234567];
pnt operator-(pnt a, pnt b) { return pnt(a.x - b.x, a.y - b.y); }
double operator*(pnt a, pnt b) { return a.x * b.y - a.y * b.x; }
double pf(double x) { return x * x; }
double dis(pnt a, pnt b) { return sqrt(pf(a.x - b.x) + pf(a.y - b.y)); }
pnt mid(pnt a, pnt b) { return pnt((a.x + b.x) / 2, (a.y + b.y) / 2); }
struct lne {
  double a, b, c;
  lne() { a = b = c = 0; }
  lne(double x, double y, double z) {
    a = x;
    b = y;
    c = z;
  }
};
double dj(pnt a, pnt b) { return a.x * b.x + a.y * b.y; }
pnt operator*(lne a, lne b) {
  return pnt((b.c * a.b - a.c * b.b) / (a.a * b.b - a.b * b.a),
             (a.c * b.a - b.c * a.a) / (a.a * b.b - a.b * b.a));
}
lne zcx(pnt a, pnt b) {
  double mx = (a.x + b.x) / 2, my = (a.y + b.y) / 2;
  double la = a.x - b.x, lb = a.y - b.y, lc = -(mx * la + my * lb);
  return lne(la, lb, lc);
}
pnt wx(pnt a, pnt b, pnt c) { return zcx(a, b) * zcx(a, c); }
double eps = 1e-6;
pnt np(pnt a, pnt b, pnt c) {
  if (fabs((b - a) * (c - a)) < eps) {
    double abl = dis(a, b), acl = dis(a, c), bcl = dis(b, c), ans = -1;
    pnt ap;
    if (abl > ans) ans = abl, ap = mid(a, b);
    if (acl > ans) ans = acl, ap = mid(a, c);
    if (bcl > ans) ans = bcl, ap = mid(b, c);
    return ap;
  }
  return wx(a, b, c);
}
double gr(pnt o, pnt a, pnt b, pnt c) {
  return max(max(dis(o, a), dis(o, b)), dis(o, c));
}
pair<pnt, double> rs[2234567];
int rn;
double area(pnt a, pnt b, pnt c) { return fabs((b - a) * (c - a)); }
bool in(pnt a, pnt b, pnt c, pnt o) {
  return fabs(area(a, b, c) - area(a, b, o) - area(c, b, o) - area(a, c, o)) <
         10;
}
double dis(pair<pnt, double> A, pair<pnt, double> B) {
  double d = dis(A.first, B.first), r1 = A.second, r2 = B.second;
  double d00 = fabs(d + r1 + r2), d01 = fabs(d + r1 - r2),
         d10 = fabs(d - r1 + r2), d11 = fabs(d - r1 - r2);
  return max(max(min(d11, d10), min(d01, d00)),
             max(min(d11, d01), min(d10, d00)));
}
int ff[2234567];
int gf(int x) { return ff[x] ? ff[x] = gf(ff[x]) : x; }
pair<double, pair<int, int> > es[2234567];
int en;
const double PI = acos(-1);
double ang(pnt s) { return atan2(s.y, s.x); }
vector<int> ap[2234567];
int main() {
  scanf("%d%d", &k, &n);
  N = k * n;
  for (int i = 1; i <= N; ++i) scanf("%lf%lf", &p[i].x, &p[i].y);
  random_shuffle(p + 1, p + 1 + N);
  while (clock() < CLOCKS_PER_SEC * 10) {
    int x = rand() % N + 1, y = rand() % N + 1, z = rand() % N + 1;
    if (x == y || x == z || y == z) continue;
    if (rn >= 2000) break;
    pnt o = np(p[x], p[y], p[z]);
    if (in(p[x], p[y], p[z], o))
      ;
    else
      continue;
    double R = gr(o, p[x], p[y], p[z]);
    int cn = 0;
    vector<double> pr;
    pr.push_back(-PI);
    pr.push_back(PI);
    for (int j = 1; j <= N; ++j) {
      double r = dis(o, p[j]);
      if (0.85 * R <= r && r <= 1.15 * R) {
        pr.push_back(ang(p[j] - o));
        ++cn;
      }
    }
    if (cn < n) continue;
    if (o.x * o.x + o.y * o.y <= 1000000.0 * 1000000)
      ;
    else
      continue;
    if (R >= 240000 && R <= 760000)
      ;
    else
      continue;
    sort(pr.begin(), pr.end());
    bool bad = 0;
    double mx = 0;
    for (int i = 1; i < pr.size(); ++i)
      if (pr[i] - pr[i - 1] > 1) mx = max(mx, pr[i] - pr[i - 1]), bad = 1;
    if (bad) continue;
    rs[++rn] = make_pair(o, R);
  }
  for (int i = 1; i <= rn; ++i)
    for (int j = i + 1; j <= rn; ++j) {
      double d = dis(rs[i], rs[j]);
      es[++en] = make_pair(d, pair<int, int>(i, j));
    }
  sort(es + 1, es + 1 + en);
  int tt = rn;
  for (int i = 1; i <= en; ++i) {
    int x = gf(es[i].second.first), y = gf(es[i].second.second);
    if (x != y) {
      --tt;
      ff[x] = y;
      if (tt == k) break;
    }
  }
  for (int i = 1; i <= rn; ++i) ap[gf(i)].push_back(i);
  for (int i = 1; i <= rn; ++i)
    if (!ff[i]) {
      double mi = 8e18;
      int X;
      for (auto x : ap[i]) {
        double dd = 0;
        for (auto y : ap[i]) dd += dis(rs[x], rs[y]);
        if (dd < mi) mi = dd, X = x;
      }
      printf("%.10lf %.10lf %.10lf\n", rs[X].first.x, rs[X].first.y,
             rs[X].second);
    }
}