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;
using ll = long long;
mt19937 mt(736);
using point = pair<double, double>;
using ipoint = pair<int, int>;
const int miss = 30000;
ipoint operator-(ipoint a, ipoint b) {
  return {a.first - b.first, a.second - b.second};
}
template <class T>
T dist(T d, T r1, T r2) {
  auto ans = numeric_limits<T>::max();
  for (int a : {-1, 1})
    for (int b : {-1, 1}) ans = min(ans, d + a * r1 + b * r2);
  return ans;
}
template <class T>
T sqr(T x) {
  return x * x;
}
double len2(ipoint A) { return sqr((ll)A.first) + sqr((ll)A.second); }
point circumcircle(ipoint A, ipoint B, ipoint C) {
  auto D = A.first * (B.second - (double)C.second) +
           B.first * (C.second - (double)A.second) +
           C.first * (A.second - (double)B.second);
  D *= 2;
  double x =
      (len2(A) * (B.second - C.second) + (len2(B)) * (C.second - A.second) +
       len2(C) * (A.second - B.second)) /
      D;
  double y = (len2(A) * (C.first - B.first) + len2(B) * (A.first - C.first) +
              len2(C) * (B.first - A.first)) /
             D;
  ipoint U(x, y);
  if (max(abs(x), abs(y)) > 1e6 || len2(U) > 1e12)
    return {numeric_limits<int>::max(), numeric_limits<int>::max()};
  return U;
}
void solve(istream &cin = std::cin, ostream &cout = std::cout) {
  int k, n;
  cin >> k >> n;
  vector<ipoint> pts(n * k);
  for (auto &it : pts) cin >> it.first >> it.second;
  shuffle(pts.begin(), pts.end(), mt);
  while (true) {
    vector<ipoint> bad = pts;
    vector<pair<ipoint, int>> centers;
    for (int i = 0; i < 1e3 && !bad.empty(); i++) {
      shuffle(bad.begin(), bad.end(), mt);
      if (bad.size() < 3) {
        break;
      } else {
        auto cent = circumcircle(bad[0], bad[1], bad[2]);
        if (cent.first != numeric_limits<int>::max()) {
          int r = (int)round(sqrt(len2(cent - bad[0])));
          int cnt = 0;
          r = min(r, 750000);
          r = max(r, 250000);
          for (auto it : pts)
            if (abs(sqrt(len2(cent - it)) - r) <= 0.1 * r + miss) cnt++;
          if (cnt >= n) {
            if (centers.size() < k) {
              centers.emplace_back(cent, r);
            } else {
              vector<int> d(k);
              for (int j = 0; j < k; j++)
                d[j] = dist((int)sqrt(len2(centers[j].first - cent)),
                            centers[j].second, r);
              int wh = min_element(d.begin(), d.end()) - d.begin();
              centers[wh].first.first =
                  (centers[wh].first.first + cent.first) / 2;
              centers[wh].first.second =
                  (centers[wh].first.second + cent.second) / 2;
              centers[wh].second = (centers[wh].second + r) / 2;
            }
          }
        }
      }
      bad.clear();
      for (auto it : pts) {
        bool good = false;
        for (auto cent : centers) {
          if (abs(sqrt(len2(cent.first - it)) - cent.second) <=
              0.1 * cent.second + miss) {
            good = true;
            break;
          }
        }
        if (!good) bad.push_back(it);
      }
    }
    if (bad.empty() && centers.size() == k) {
      for (auto it : centers)
        cout << it.first.first << ' ' << it.first.second << ' ' << it.second
             << endl;
      return;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << fixed;
  solve();
  return 0;
}