Problem: E: How To Make Stars-

story

Kitano Kisaka Gakuin 1st grade stardust bell! I like the stars of the bells! At night, I'm always secretly watching the stars on the roof of the school with my childhood friend Hanayo-chin! But unfortunately the weather today is rainy ... With this, you can't see the stars! What should I do with Hanayo?

Suzu "... Ah! Nya who came up with a good idea! Nya who makes a big planetarium where you can see various stars! Hanayo-chin! Nya who will do it right away!"

Hanayo "Well, eh, Suzu-chan, wait a minute! I don't know how to make a planetarium!"

Suzu "It's okay! You can do it if you work together!

Hanayo "Da, Darekatasukete ~!"

problem

In a polygon without self-intersection, when the number of vertices is 10 and the circumference is traced in a certain direction from any vertex, the internal angle is 30 degrees or more and 60 degrees or less, and the internal angle is 240 degrees. A "star" is defined as one in which parts with a temperature of 270 degrees or more appear alternately.

The rank of a star is determined by its area. Specifically, those with an area of ​​S_1 or more are called first-class stars, and those with an area smaller than S_ {i−1} and S_i or more are called i-class stars (i ≥ 2).

Assuming that there are n classes, n kinds of areas S_1, ..., S_n are given as a guideline for the classes, so for each k (1 ≤ k ≤ n), a star that is a k-class star is created, and a two-dimensional plane is created. Place it on top. However, the stars must not overlap each other.

Input format

The input is given in the following format.


n
S_1 ... S_n


The number n of the classes is given in the first line. On the second line, the integers S_1 to S_n, which represent the area that serves as a guide for the class, are given in order, separated by blanks.

The input satisfies the following constraints.

* 1 ≤ n ≤ 100
* 1 ≤ S_i ≤ 100,000 (1 ≤ i ≤ n)
* If i <j, then S_i> S_j



Output format

For all class stars, output the class integer k on the first line, and output the coordinates (x, y) of 10 vertices counterclockwise from any vertex on the following 10 lines line by line. .. For the coordinates of the vertices (x, y), output x and y separated by blanks. Output the stars in order from the first-class stars. That is, the output is as follows.


First-class star output
...
n-class star output


For k-class stars, the output is as follows.


k
x_1 y_1
...
x_ {10} y_ {10}


However, the absolute value of the coordinates must not exceed 5,000. Also, since the output can be very large, the output of the coordinate values ​​should be up to 9 digits after the decimal point.

For the internal angle of a star, allow an absolute error from the specified range up to 10 ^ {−3} rad (radians).

It is not permissible for stars to intersect or touch each other, or for one star to be contained in another. Here, the fact that the stars are in contact means that the distance between any two sides contained in different stars is 10 ^ {−7} or less.

The area of ​​the first-class star must be S_1 or more, and the area of ​​the i-class star (i ≥ 2) must be less than S_ {i−1} and more than S_i, but the absolute error is allowed up to 10 ^ {−7}.

The distance between any two vertices that make up a star must be greater than or equal to 10 ^ {−3}.

Input example 1


2
10 5


Output example 1


1
-10.00 -6.48
-10.79 -8.91
-13.34 -8.91
-11.28 -10.41
-12.07 -12.84
-10.00 -11.34
-7.93 -12.84
-8.72 -10.41
-6.66 -8.91
-9.21 -8.91
2
10.00 12.34
9.47 10.72
7.77 10.72
9.15 9.72
8.62 8.10
10.00 9.10
11.38 8.10
10.85 9.72
12.23 10.72
10.53 10.72


Input example 2


3
10 8 5


Output example 2


1
-10.00 -6.48
-10.79 -8.91
-13.34 -8.91
-11.28 -10.41
-12.07 -12.84
-10.00 -11.34
-7.93 -12.84
-8.72 -10.41
-6.66 -8.91
-9.21 -8.91
2
10.00 12.93
9.34 10.91
7.21 10.91
8.94 9.65
8.28 7.63
10.00 8.88
11.72 7.63
11.06 9.65
12.79 10.91
10.66 10.91
3
20.00 22.34
19.47 20.72
17.77 20.72
19.15 19.72
18.62 18.10
20.00 19.10
21.38 18.10
20.85 19.72
22.23 20.72
20.53 20.72






Example

Input

2
10 5


Output

1
-10.00 -6.48
-10.79 -8.91
-13.34 -8.91
-11.28 -10.41
-12.07 -12.84
-10.00 -11.34
-7.93 -12.84
-8.72 -10.41
-6.66 -8.91
-9.21 -8.91
2
10.00 12.34
9.47 10.72
7.77 10.72
9.15 9.72
8.62 8.10
10.00 9.10
11.38 8.10
10.85 9.72
12.23 10.72
10.53 10.72

Solution (in CPP):

Solution:
#include "iostream"
#include "random"
#include "string"
#include "bitset"
#include "algorithm"
#include "map"
#include "queue"
#include "list"
#include "set"
#include "climits"
#include "iomanip"
#include "stack"
#include "functional"
#include "complex"

using namespace std;
using ll = long long int;
using PII = pair<ll, ll>;

using R = long double;
using P = complex<R>;
using L = pair<P, P>;
using G = vector<P>;
struct S : public L {
	S() {}
	S(const P &a, const P &b) : L(a, b) {}
};

const R EPS = 1e-8;
const R PI = atan(1) * 4;

inline int sgn(const R& r) { return (r > EPS) - (r < -EPS); }
inline R dot(const P& a, const P& b) {
	return real(a)*real(b) + imag(a)*imag(b);
}
inline R det(const P& a, const P& b) {
	return real(a)*imag(b) - imag(a)*real(b);
}
inline P vec(const L& l) { return l.second - l.first; }

inline P crosspoint(const L& l1, const L& l2) {
	R ratio = det(vec(l2), l2.first - l1.first) / det(vec(l2), vec(l1));
	return l1.first + vec(l1) * ratio;
}

R area(const G& pol) {
	R ret = 0.0;
	for (int i = 0; i < pol.size(); ++i) {
		ret += det(pol[i], pol[(i + 1) % pol.size()]);
	}
	return ret / 2.0;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int N;
	cin >> N;
	vector<long double>v(N);
	for (auto &i : v) {
		cin >> i;
		i += 0.1;
	}
	vector<long double>x(10);
	vector<long double>y(10);
	vector<P>p(10);
	long double sx = 0, sy = 0;
	for (int i = 0; i < 10; i += 2) {
		x[i] = cos(PI*i / 5);
		y[i] = sin(PI*i / 5);
		p[i] = { x[i],y[i] };
	}
	for (int i = 1; i < 10; i += 2) {
		p[i] = crosspoint(L(p[(i + 9) % 10], p[(i + 3) % 10]), L(p[(i + 1) % 10], p[(i + 7) % 10]));
	}
//	reverse(p.begin(), p.end());
	long double r = area(p);
	int num = 1;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			if (num>N)return 0;
			cout << num << endl;
			sx = i * 1000 - 5000 + 500;
			sy = j * 1000 - 5000 + 500;
			long double rr = sqrt(v[num - 1] / r);
			G t;
			for (auto k : p) {
				t.push_back({ sx + k.real()*rr ,sy + k.imag()*rr });
				cout << fixed << setprecision(9) << sx + k.real()*rr << " " << sy + k.imag()*rr << endl;
			}
			//cout << area(t) << endl;
			num++;
		}
	}
}