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<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define fs first
#define sc second
using namespace std;
typedef double D;
typedef complex<D> P;
typedef pair<P,P> L;
typedef vector<P> Poly;

const D PI = acos(-1);
const int MAX_X = 5000;
const int MAX_N = 100, SQRT_MAX_N = ceil( sqrt(MAX_N) - 1e-8 );
const int B_SIZE = 2*MAX_X / SQRT_MAX_N;

inline D cross(P x, P y){return imag(conj(x)*y);}

inline P rotate(P v, D s){
  return P(real(v)*cos(s) - imag(v)*sin(s), real(v)*sin(s) + imag(v)*cos(s));
}

inline P line_cp(L a, L b){
  return a.fs+(a.sc-a.fs)*cross(b.sc-b.fs,b.fs-a.fs)/cross(b.sc-b.fs,a.sc-a.fs);
}

inline D area(Poly p){
  D res = 0;
  rep(i,p.size()){
    res += cross(p[i],p[(i+1)%p.size()]);
  }
  return res/2;
}

inline Poly make_reg_k_polygon(int k, D r){
  Poly res;
  P p = P(0,r); res.push_back(p);
  rep(i,k-1){
    p = rotate(p,2*PI/k);
    res.push_back(p);
  }
  return res;
}

inline Poly make_star(Poly p){
  Poly res;
  rep(i,p.size()){
    int p1 = i, p2 = (i+1)%p.size(), p3 = (i+2)%p.size(), p4 = (i+3)%p.size();
    P cp = line_cp(L(p[p1],p[p2]),L(p[p3],p[p4]));
    res.push_back(cp);
    res.push_back(p[p3]);
  }
  return res;
}

inline P get_cnetar(int i){
  int h = i/SQRT_MAX_N, w = i%SQRT_MAX_N;
  return P(B_SIZE*w + B_SIZE/2 - MAX_X, B_SIZE*h + B_SIZE/2 - MAX_X);
}

int main(){
  int n;
  cin >> n;
  vector<int> s(n);
  rep(i,n)cin >> s[i];
  Poly penta = make_reg_k_polygon(5,1);
  Poly unit_star = make_star(penta);
  D unit_area = area(unit_star);

  rep(i,n){
    P c = get_cnetar(i);
    D ratio = sqrt((D)(s[i]+0.5) / unit_area);

    cout << i+1 << endl;
    rep(i,unit_star.size()){
      cout << fixed << setprecision(9)
	   << unit_star[i].real()*ratio + c.real() << " "
	   << unit_star[i].imag()*ratio + c.imag() << endl;
    }
  }
}