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;
template <class T>
struct Point {
  T x, y;
  explicit Point(T x = 0, T y = 0) : x(x), y(y) {}
  bool operator<(Point p) const { return tie(x, y) < tie(p.x, p.y); }
  bool operator==(Point p) const { return tie(x, y) == tie(p.x, p.y); }
  Point operator+(Point p) const { return Point(x + p.x, y + p.y); }
  Point operator-(Point p) const { return Point(x - p.x, y - p.y); }
  Point operator*(T d) const { return Point(x * d, y * d); }
  Point operator/(T d) const { return Point(x / d, y / d); }
  T dot(Point p) const { return x * p.x + y * p.y; }
  T cross(Point p) const { return x * p.y - y * p.x; }
  T cross(Point a, Point b) const { return (a - *this).cross(b - *this); }
  T dist2() const { return x * x + y * y; }
  double dist() const { return sqrt((double)dist2()); }
  double angle() const { return atan2(y, x); }
  Point unit() const { return *this / dist(); }
  Point perp() const { return Point(-y, x); }
  Point normal() const { return perp().unit(); }
  Point rotate(double a) const {
    return Point(x * cos(a) - y * sin(a), x * sin(a) + y * cos(a));
  }
};
double ccRadius(const Point<double>& A, const Point<double>& B,
                const Point<double>& C) {
  return (B - A).dist() * (C - B).dist() * (A - C).dist() /
         abs((B - A).cross(C - A)) / 2;
}
Point<double> ccCenter(const Point<double>& A, const Point<double>& B,
                       const Point<double>& C) {
  Point<double> b = C - A, c = B - A;
  return A + (b * c.dist2() - c * b.dist2()).perp() / b.cross(c) / 2;
}
const int MAXN = 5000;
int N, K;
Point<double> pt[MAXN];
pair<Point<double>, double> res[4];
long double cdist(pair<Point<double>, double> left,
                  pair<Point<double>, double> right) {
  return abs(left.first.x - right.first.x) + abs(left.first.y - right.first.y) +
         abs(left.second - right.second);
}
void gogo() {
  while (true) {
    int cval = 0;
    while (cval < K) {
      int a = rand() % (N * K), b = rand() % (N * K), c = rand() % (N * K);
      if (a == b || a == c || b == c) continue;
      if (!((pt[b] - pt[a]).cross(pt[c] - pt[a]))) continue;
      Point<double> cc = ccCenter(pt[a], pt[b], pt[c]);
      double rad = ccRadius(pt[a], pt[b], pt[c]);
      if (cc.dist() > 1050000 || rad < 200000 || rad > 800000) continue;
      bool bad = false;
      for (int i = 0; i < cval; i++) {
        if (cdist(res[i], make_pair(cc, rad)) < 350000) {
          bad = true;
          break;
        }
      }
      if (bad) continue;
      int nhit = 0;
      vector<double> v;
      for (int i = 0; i < N * K; i++) {
        double d = (cc - pt[i]).dist();
        if (d > 0.87 * rad && d < 1.13 * rad) {
          nhit++;
          v.push_back((cc - pt[i]).angle());
        }
      }
      sort(v.begin(), v.end());
      for (int i = 0; i + 1 < v.size(); i++)
        if (v[i + 1] - v[i] > 1) {
          bad = true;
        }
      if (bad) continue;
      if (nhit >= N) {
        res[cval] = make_pair(cc, rad);
        cval++;
      }
    }
    bool bad = false;
    for (int i = 0; i < N * K; i++) {
      bool found = false;
      for (int j = 0; j < K; j++) {
        double d1 = res[j].second, d2 = (res[j].first - pt[i]).dist();
        if (d2 >= 0.8 * d1 && d2 <= 1.2 * d1) found = true;
      }
      if (!found) {
        bad = true;
        break;
      }
    }
    if (!bad) break;
  }
}
int main() {
  srand(time(NULL));
  cin >> K >> N;
  for (int i = 0; i < N * K; i++) {
    cin >> pt[i].x >> pt[i].y;
  }
  gogo();
  cout << fixed << setprecision(8);
  for (int i = 0; i < K; i++) {
    cout << res[i].first.x << " " << res[i].first.y << " " << res[i].second
         << "\n";
  }
}