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;
using ld = long double;
template <typename T>
vector<T>& operator--(vector<T>& v) {
  for (auto& i : v) --i;
  return v;
}
template <typename T>
vector<T>& operator++(vector<T>& v) {
  for (auto& i : v) ++i;
  return v;
}
template <typename T>
istream& operator>>(istream& is, vector<T>& v) {
  for (auto& i : v) is >> i;
  return is;
}
template <typename T>
ostream& operator<<(ostream& os, vector<T> v) {
  for (auto& i : v) os << i << ' ';
  return os;
}
template <typename T, typename U>
pair<T, U>& operator--(pair<T, U>& p) {
  --p.first;
  --p.second;
  return p;
}
template <typename T, typename U>
pair<T, U>& operator++(pair<T, U>& p) {
  ++p.first;
  ++p.second;
  return p;
}
template <typename T, typename U>
istream& operator>>(istream& is, pair<T, U>& p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T, typename U>
ostream& operator<<(ostream& os, pair<T, U> p) {
  os << p.first << ' ' << p.second;
  return os;
}
template <typename T, typename U>
pair<T, U> operator-(pair<T, U> a, pair<T, U> b) {
  return make_pair(a.first - b.first, a.second - b.second);
}
template <typename T, typename U>
pair<T, U> operator+(pair<T, U> a, pair<T, U> b) {
  return make_pair(a.first + b.first, a.second + b.second);
}
template <typename T, typename U>
void umin(T& a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
void umax(T& a, U b) {
  if (a < b) a = b;
}
struct point {
  ld x, y;
  int i;
  point(ld x = 0, ld y = 0) : x(x), y(y) {}
  point(point a, point b) {
    x = b.x - a.x;
    y = b.y - a.y;
  }
  ld dist(point b) const {
    return sqrt((b.x - x) * (b.x - x) + (b.y - y) * (b.y - y));
  }
  ld sdist(point b) const {
    return ((b.x - x) * (b.x - x) + (b.y - y) * (b.y - y));
  }
  ld len() const { return sqrt(x * x + y * y); }
  ld slen() const { return x * x + y * y; }
  point ort() const { return point(-y, x); }
  ld dp(point p) const { return x * p.x + y * p.y; }
  ld cp(point p) const { return x * p.y - y * p.x; }
  point operator+(point a) const { return point(a.x + x, a.y + y); }
  point operator-(point a) const { return point(x - a.x, y - a.y); }
  point operator*(ld k) const { return point(x * k, y * k); }
  point operator/(ld k) const { return point(x / k, y / k); }
  point& norm() {
    ld d = len();
    if (d != 0) {
      x /= d;
      y /= d;
    }
    return *this;
  }
};
ostream& operator<<(ostream& o, const point& p) {
  return o << "(" << p.x << ", " << p.y << ")";
}
mt19937_64 rng(387246283);
ll rnd(ll l, ll r) { return (ll)(rng() % (r - l + 1)) + l; }
ll rnd(ll r) { return rng() % r; }
ll rnd() { return rng(); }
ld rndf() { return (ld)rng() / (ld)ULLONG_MAX; }
ld rndf(ld l, ld r) { return rndf() * (r - l) + l; }
const ld pi = acosl(-1.0l);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int k, n;
  cin >> k >> n;
  vector<point> v(n * k);
  for (int i = 0; i < v.size(); ++i) {
    cin >> v[i].x >> v[i].y;
    v[i].i = i;
  }
  for (int it = 0; it < k; ++it) {
    vector<pair<ld, pair<pair<int, int>, int>>> cands;
    pair<pair<int, int>, int> at_least_something;
    int sz = -1;
    for (int j = 0; j < 100; ++j) {
      ld P = 0;
      for (int i = 0; i < 1000; ++i) {
        point a = v[rnd(v.size())];
        point b = v[rnd(v.size())];
        point c = v[rnd(v.size())];
        for (int i = 0; i < v.size(); ++i) {
          swap(v[i], v[rnd(i, v.size() - 1)]);
        }
        if (max({a.dist(b), a.dist(c), b.dist(c)}) < 1000) continue;
        if ((a - b).cp(a - c) == 0) continue;
        b = b - a;
        c = c - a;
        ld d = 2 * (b.x * c.y - b.y * c.x);
        point o((c.y * b.slen() - b.y * c.slen()) / d,
                (b.x * c.slen() - c.x * b.slen()) / d);
        ld r = o.len();
        o = o + a;
        b = b + a;
        c = c + a;
        if (r < 200000 * (1.0 - P) || r > 850000 * (1.0 + P)) continue;
        if (abs(o.x) > 1.1e6 || abs(o.y) > 1.1e6) continue;
        vector<ld> angles;
        for (auto p : v) {
          if (angles.size() == int(n * 0.9)) break;
          ld d = o.dist(p);
          if (d < (0.9 - P) * r) continue;
          if (d > (1.1 + P) * r) continue;
          angles.push_back(atan2(o.y - p.y, o.x - p.x));
        }
        if ((int)angles.size() > sz) {
          sz = angles.size();
          at_least_something = make_pair(make_pair(o.x, o.y), r);
        }
        if (angles.size() < n * (0.6)) continue;
        ld mx = 0;
        sort(angles.begin(), angles.end());
        for (int i = 0; i + 1 < angles.size(); ++i)
          mx = max(mx, angles[i + 1] - angles[i]);
        mx = max(mx, angles[0] - angles.back() + pi * 2);
        cands.emplace_back(mx, make_pair(make_pair(o.x, o.y), r));
      }
      if (!cands.empty()) break;
      P += 0.01;
    }
    if (cands.empty()) cands.emplace_back(0, at_least_something);
    sort(cands.begin(), cands.end());
    for (int i = 0; i < v.size(); ++i) {
      swap(v[i], v[rnd(i, v.size() - 1)]);
    }
    if (cands.empty())
      cout << "0 0 0\n";
    else {
      auto [xy, r] = cands[0].second;
      auto [x, y] = xy;
      cout << x << ' ' << y << ' ' << r << endl;
      set<int> u;
      point o(x, y);
      for (auto p : v) {
        if (u.size() == n) break;
        ld d = o.dist(p);
        if (d < 0.85 * r) continue;
        if (d > 1.15 * r) continue;
        u.insert(p.i);
      }
      vector<point> v2;
      for (auto p : v)
        if (!u.count(p.i)) v2.push_back(p);
      swap(v, v2);
    }
  }
  return 0;
}