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;
const double ep = 1e-8;
const double pi = 3.14159265358979323846264338327950288L;
struct pnt {
  double x, y;
  pnt(double x = 0, double y = 0) : x(x), y(y) {}
  pnt operator+(const pnt &b) { return pnt(x + b.x, y + b.y); }
  pnt operator-(const pnt &b) { return pnt(x - b.x, y - b.y); }
  pnt operator*(const double &b) { return pnt(x * b, y * b); }
  pnt operator/(const double &b) { return pnt(x / b, y / b); }
  double operator&(const pnt &b) { return x * b.x + y * b.y; }
  double operator^(const pnt &b) { return x * b.y - b.x * y; }
  pnt rot() { return pnt(-y, x); }
  friend double dist(pnt a) { return sqrt(a.x * a.x + a.y * a.y); };
  void input() { scanf("%lf %lf", &x, &y); }
  void print() { printf("%.12lf %.12lf ", x, y); }
} p[10010];
pnt outc(pnt a, pnt b, pnt c) {
  return (a + b + (b - a).rot() * (a - c & b - c) / (a - c ^ b - c)) / 2;
}
bool vis[10010];
double del;
bool check(pnt O, double r, vector<int> &rlt) {
  if (dist(O) > 1000100 || r < 240000 || r > 760000) return 0;
  int cnt = 0;
  vector<int> cur;
  for (int i = 0; i < n * k; i++) {
    if (vis[i]) continue;
    double d = dist(O - p[i]);
    if (0.9 * r <= d && d <= 1.1 * r) cnt++, cur.push_back(i);
  }
  if (cnt < del * n) return 0;
  random_shuffle(cur.begin(), cur.end());
  rlt.clear();
  for (int i = 0; i < cnt && i < n; i++) vis[cur[i]] = 1, rlt.push_back(cur[i]);
  return 1;
}
vector<pnt> ans;
vector<double> ans_r;
bool good(pnt a, pnt b, pnt c) {
  if ((b - a & c - a) < 0) return 0;
  if ((c - b & a - b) < 0) return 0;
  if ((a - c & b - c) < 0) return 0;
  return 1;
}
bool solve(int cc) {
  if (cc == k) return 1;
  vector<int> vec;
  for (int j = 0; j < n * k; j++)
    if (!vis[j]) vec.push_back(j);
  int sz = vec.size(), cnt = 0;
  while (cnt < 100) {
    int a = rand() % sz, b = rand() % sz, c = rand() % sz;
    while (b == a) b = rand() % sz;
    while (c == b || c == a) c = rand() % sz;
    pnt O = outc(p[vec[a]], p[vec[b]], p[vec[c]]);
    double r = dist(O - p[vec[a]]);
    vector<int> vec;
    if (check(O, r, vec)) {
      ans[cc] = O, ans_r[cc] = r;
      if (solve(cc + 1)) return 1;
      int sz = vec.size();
      for (int j = 0; j < sz; j++) vis[vec[j]] = 0;
    }
    cnt++;
  }
  return 0;
}
int main() {
  scanf("%d %d", &k, &n);
  for (int i = 0; i < n * k; i++) p[i].input();
  random_shuffle(p, p + n * k);
  ans.resize(k), ans_r.resize(k);
  for (del = 1.0; !solve(0); del -= 0.03)
    ;
  for (int i = 0; i < k; i++) ans[i].print(), printf("%.12lf\n", ans_r[i]);
  return 0;
}