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:
//~ while (clock()<=69*CLOCKS_PER_SEC)
//~ #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
//~ #pragma GCC optimize("Ofast")
//~ #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//~ #pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

template <typename T>
using ordered_set =
    tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

#define shandom_ruffle random_shuffle

using ll=long long;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using vi=vector<int>;
using vll=vector<ll>;
const int nax=4007;
using ld=double;
using pdd=pair<ld,ld>;

int k, n, m;
vector <pdd> znam;

pdd operator + (pdd a, pdd b)
{
	return {a.first+b.first, a.second+b.second};
}

pdd operator - (pdd a, pdd b)
{
	return {a.first-b.first, a.second-b.second};
}

pdd operator * (pdd a, ld b)
{
	return {a.first*b, a.second*b};
}

pdd operator / (pdd a, ld b)
{
	return {a.first/b, a.second/b};
}

ld dlu(pdd v)
{
	return sqrt(v.first*v.first+v.second*v.second);
}

ld odl(pdd a, pdd b)
{
	return dlu(a-b);
}

pdd sr(vector <pdd> wek)
{
	pdd ret{0, 0};
	for (pdd i : wek)
		ret=ret+i;
	return ret/wek.size();
}

int los(int a, int b)
{
	return a+rand()%(b-a+1);
}

int zawie(pair <pdd,ld> a, pdd b)
{
	ld mag=0.2;
	ld y=odl(a.first, b);
	return ((1-mag)*a.second<=y && y<=(1+mag)*a.second);
}

int main()
{
	srand(time(0));
	scanf("%d%d", &k, &n);
	m=k*n;
	for (int i=1; i<=m; i++)
	{
		ld x, y;
		scanf("%lf%lf", &x, &y);
		znam.push_back({x, y});
	}
	n*=0.9;
	
	
	for (int h=0; h<k; h++)
	{
		vector <pair<pdd,ld>> kan;
		for (int h=0; h<20000; h++)
		{
			int ile=los(2, 5);
			vector <pdd> daj;
			for (int i=0; i<ile; i++)
				daj.push_back(znam[los(0, m-1)]);
			pdd x=sr(daj);
			ld y=0;
			for (pdd j : daj)
				y+=odl(j, x);
			y/=ile;
			kan.push_back({x, y});
		}
		int kto=-1;
		ld dokl=1e18;
		for (int i=0; i<(int)kan.size(); i++)
		{
			vector <ld> dys;
			for (int j=0; j<m; j++)
				dys.push_back(abs(kan[i].second-odl(kan[i].first, znam[j])));
			sort(dys.begin(), dys.end());
			ld x=dys[n-1];
			if (x<dokl)
			{
				dokl=x;
				kto=i;
			}
		}
		printf("%lf %lf %lf\n", kan[kto].first.first, kan[kto].first.second, kan[kto].second);
		vector <pair<ld,pdd>>dys;
		for (int j=0; j<m; j++)
			dys.push_back({abs(kan[kto].second-odl(kan[kto].first, znam[j])), znam[j]});
		sort(dys.begin(), dys.end());
		znam.clear();
		for (int j=n; j<m; j++)
			znam.push_back(dys[j].second);
		m-=n;
	}
	return 0;
}