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 PYTHON):

Solution:
# coding: utf-8
 
import math, sys, time, bisect, sys
 
k = int(raw_input())
n = int(raw_input())
pts = []
for _ in xrange(n*k):
	x,y = map(int, raw_input().split())
	pts.append( (x,y) )
 
def distribution(x,y,pts=pts,n=n,k=k):
	# smallest circle: radius 2.5e5, extended to at most 1.1 times that. but we can also be about 1e5 off on the radius.
	# so all points will be within 2.5*0.9-1=1.25 up to 1+2.5*1.1=3.75
	rs = []
	for x2,y2 in pts:
		rs.append(((((x-x2)**2+(y-y2)**2)**.5), math.atan2(y2-y, x2-x)))
	rs.sort()
 
	angle_cumbuckets = [[0] for _ in xrange(12)]
	angles = [-math.pi+i*2*math.pi/len(angle_cumbuckets) for i in xrange(len(angle_cumbuckets)+1)]
	for i in xrange(len(angle_cumbuckets)):
		angle1, angle2 = angles[i], angles[i+1]
		for r,a in rs:
			if angle1<=a<angle2:
				angle_cumbuckets[i].append( angle_cumbuckets[i][-1] + 1)
			else:
				angle_cumbuckets[i].append( angle_cumbuckets[i][-1] )
 
	best = (1e12,None)
	uniformity = None
	for i in xrange(len(rs)):
		r1 = rs[i][0]
		# points between radii r*0.9-OFFSET to r*1.1+OFFSET when radius is r
 
		r = (r1+OFFSET*1e5/2.)/0.9 # r is this without OFFSET but let's average it (this is not the correct avg)
		if (r1+OFFSET*1e5)/0.9<2.5e5:
			continue
		r2 = (r1+OFFSET*1e5)/0.9*1.1+OFFSET*1e5
 
 
		j = bisect.bisect(rs, (r2,))
		if j-i < n*0.99:
			continue
 
		j = min(j, len(rs)-1)
		dist = j-i
		possible_r = r
		candidate = (-dist, possible_r)
		if candidate<best and all([angle_cumbuckets[a][j+1]-angle_cumbuckets[a][i+1]>=0.1*n/len(angle_cumbuckets) for a in xrange(len(angle_cumbuckets))]):
			best=candidate
			uniformity = min([angle_cumbuckets[a][j+1]-angle_cumbuckets[a][i+1] for a in xrange(len(angle_cumbuckets))])#/(float(n)/len(angle_cumbuckets))
		if j == len(rs)-1:
			break
	best = list(best)
	best[0] = -uniformity if uniformity is not None else None
	return tuple(best)
 
def J(data):
	ret = 0.0
	for x2,y2 in pts:
		thing = 1e15
		for i in xrange(k):
			x,y,r = data[3*i], data[3*i+1], data[3*i+2]
			#ret += abs(((x-x2)**2+(y-y2)**2)/r-1)
			thing = min(thing, math.sqrt(abs(r**2-((x-x2)**2+(y-y2)**2))))
		ret += thing
	return ret
 
def gradient_descent_auto(x,J,delta, alpha=1000):
	iterations = 200
	rolling = []
	for it in xrange(iterations):
		j = J(x)
		if len(rolling)<4:
			rolling.append((j,x[:]))
		else:
			if all(0.999<r[0]/j<1.001 for r in rolling[-4:]):
				return x, it
			if rolling[-4][0] < j:
				alpha /= 3.1622
				j,x = min(rolling)
				rolling = []
			else:
				rolling.append((j,x[:]))
		dx = []
		for i in xrange(len(x)):
			x2 = x[:]
			x2[i] += delta
			dx.append((J(x2)-j)/delta)
 
		for i in xrange(len(x)):
			x[i] -= dx[i]*alpha
			if i%3 == 2: # radius
				if x[i] < 0:
					x[i] = -x[i]
				x[i] = max(230000,x[i])
				x[i] = min(800000,x[i])
			else:
				x[i] = min(x[i], 1e6)
				x[i] = max(x[i], -1e6)
	return x, it
 
SIZE = 34
RANGE = 1.25e6
OFFSET = 2*RANGE/(SIZE-1.0)/1e5*5/8.
#print OFFSET
 
count = 0
peaks = []
for i in xrange(SIZE):
	for j in xrange(SIZE):
		x = -RANGE + (i+(0.5 if j%2==0 else 0))/(SIZE-1.)*2*RANGE
		y = -RANGE + j/(SIZE-1.)*2*RANGE
		count += 1
		if (x**2+y**2)**.5>RANGE:
			continue
		dist = distribution(x,y)
		if dist[1] is not None:
			peaks.append( (dist, (x,y)))
peaks.sort()
 
 
def go(candidates, pts, k, result=None):
	if result is None:
		result = []
	for i,((uniformity,r),(x,y)) in enumerate(candidates):
		remove_these = [(x2,y2) for (x2,y2) in pts if r*0.8-OFFSET*1e5 <= ((x-x2)**2+(y-y2)**2)**.5 <= r*1.2+OFFSET*1e5]
		new_pts = list(set(pts)-set(remove_these))
		if k == 1:
			if len(new_pts) == 0:
				return result+[(x,y,r)]
		else:
			ret = go(candidates[i+1:], new_pts, k-1, result+[(x,y,r)])
			if ret is not False:
				return ret
	return False
 
yay = go(peaks, pts, k)
 
 
if yay is False:
	print 'no answer'
	sys.exit(0)
 
data = []
for (x,y,r) in yay:
	data += [x,y,r]
data, its = gradient_descent_auto(data, J, 1.0, 10)
may = []
for i in range(k):
	may.append((data[i*3+0], data[i*3+1], data[i*3+2]))
 
 
 
for (x,y,r) in may:
	print x, y, r