You are given a piece of paper in the shape of a simple polygon S. Your task is to turn it into a simple polygon T that has the same area as S.

You can use two tools: scissors and tape. Scissors can be used to cut any polygon into smaller polygonal pieces. Tape can be used to combine smaller pieces into larger polygons. You can use each tool multiple times, in any order. 

The polygons given in the input have integer coordinates, but you are allowed to produce shapes with non-integer coordinates in your output.

A formal definition of the task follows.

A shape Q=(Q_0,...,Q_{n-1}) is a sequence of three or more points in the plane such that: 

  * The closed polyline Q_0Q_1Q_2... Q_{n-1}Q_0 never touches or intersects itself, and therefore it forms the boundary of a simple polygon. 
  * The polyline goes around the boundary of the polygon in the counter-clockwise direction. 



The polygon whose boundary is the shape Q will be denoted P(Q).

Two shapes are called equivalent if one can be translated and/or rotated to become identical with the other.

Note that mirroring a shape is not allowed. Also note that the order of points matters: the shape (Q_1,...,Q_{n-1},Q_0) is not necessarily equivalent to the shape (Q_0,...,Q_{n-1}).

<image>

In the figure on the left: Shapes U and V are equivalent. Shape W is not equivalent with them because the points of W are given in a different order. Regardless of the order of points, the fourth shape is not equivalent with the previous ones either as flipping a shape is not allowed.

In both input and output, a shape with n points is represented as a single line that contains 2n+1 space-separated numbers: the number n followed by the coordinates of the points: Q_{0,x}, Q_{0,y}, Q_{1,x}, ...

Shapes have identification numbers (IDs). The given shape S has ID 0, the shapes you produce in your solutions are given IDs 1, 2, 3, ..., in the order in which they are produced.

Shapes B_1,...,B_k form a subdivision of shape A if: 

  * The union of all P(B_i) is exactly P(A). 
  * For each i≠ j, the area of the intersection of P(B_i) and P(B_j) is zero. 



The scissors operation destroys one existing shape A and produces one or more shapes B_1,...,B_k that form a subdivision of A.

<image>

In the figure: Shape A (square) subdivided into shapes B_1, B_2, B_3 (the three triangles). One valid way to describe one of the B_i is "3 3 1 6 1 5.1 4".

The tape operation destroys one or more existing shapes A_1,...,A_k and produces one new shape B. In order to perform this operation, you must first specify shapes C_1,...,C_k and only then the final shape B. These shapes must satisfy the following: 

  * For each i, the shape C_i is equivalent to the shape A_i. 
  * The shapes C_1,...,C_k form a subdivision of the shape B. 



Informally, you choose the shape B and show how to move each of the existing A_i to its correct location C_i within B. Note that only the shape B gets a new ID, the shapes C_i do not.

Input

The first line contains the source shape S.

The second line contains the target shape T.

Each shape has between 3 and 10 points, inclusive. Both shapes are given in the format specified above.

All coordinates in the input are integers between -10^6 and 10^6, inclusive.

In each shape, no three points form an angle smaller than 3 degrees. (This includes non-consecutive points and implies that no three points are collinear.)

The polygons P(S) and P(T) have the same area.

Output

Whenever you use the scissors operation, output a block of lines of the form: 
    
    
      
    scissors  
    id(A) k  
    B_1  
    B_2  
    ...  
    B_k  
    

where id(A) is the ID of the shape you want to destroy, k is the number of new shapes you want to produce, and B_1,...,B_k are those shapes.

Whenever you use the tape operation, output a block of lines of the form: 
    
    
      
    tape  
    k id(A_1) ... id(A_k)  
    C_1  
    C_2  
    ...  
    C_k  
    B  
    

where k is the number of shapes you want to tape together, id(A_1),...,id(A_k) are their IDs, C_1,...,C_k are equivalent shapes showing their position within B, and B is the final shape obtained by taping them together.

It is recommended to output coordinates of points to at least 10 decimal places.

The output must satisfy the following: 

  * All coordinates of points in the output must be between -10^7 and 10^7, inclusive. 
  * Each shape in the output must have at most 100 points. 
  * In each operation the number k of shapes must be between 1 and 100, inclusive. 
  * The number of operations must not exceed 2000. 
  * The total number of points in all shapes in the output must not exceed 20000. 
  * In the end, there must be exactly one shape (that hasn't been destroyed), and that shape must be equivalent to T. 
  * All operations must be valid according to the checker. Solutions with small rounding errors will be accepted. (Internally, all comparisons check for absolute or relative error up to 10^{-3} when verifying each condition.) 

Scoring

A shape is called a nice rectangle if it has the form ((0,0),~ (x,0),~ (x,y),~ (0,y)) for some positive integers x and y.

A shape is called a nice square if additionally x=y.

A shape A is called strictly convex if all inner angles of the polygon P(A) are smaller than 180 degrees.

Subtask 1 (5 points): S and T are nice rectangles. All coordinates of all points are integers between 0 and 10, inclusive

Subtask 2 (13 points): S is a nice rectangle with x>y, and T is a nice square

Subtask 3 (12 points): S and T are nice rectangles

Subtask 4 (14 points): S is a triangle and T is a nice square

Subtask 5 (10 points): S and T are triangles

Subtask 6 (16 points): S is a strictly convex polygon and T is a nice rectangle

Subtask 7 (11 points): T is a nice rectangle

Subtask 8 (19 points): no additional constraints

Examples

Input


6 0 0 6 0 6 4 5 4 5 9 0 9
4 0 0 7 0 7 7 0 7


Output


scissors
0 5
3 0 0 3 0 3 4
3 3 4 0 4 0 0
3 3 0 6 0 6 4
3 6 4 3 4 3 0
4 0 4 5 4 5 9 0 9
tape
5 1 2 5 3 4
3 0 3 0 0 4 0
3 4 0 7 0 7 4
4 0 3 4 0 7 4 3 7
3 7 4 7 7 3 7
3 3 7 0 7 0 3
4 0 0 7 0 7 7 0 7

Input


4 0 0 3 0 3 3 0 3
4 7 -1 10 -1 11 2 8 2


Output


scissors
0 2
3 0 0 1 3 0 3
4 1 3 0 0 3 0 3 3
tape
2 1 2
3 110 -1 111 2 110 2
4 108 2 107 -1 110 -1 110 2
4 107 -1 110 -1 111 2 108 2


Input


4 0 0 9 0 9 1 0 1
4 0 0 3 0 3 3 0 3


Output


scissors
0 2
4 1.470000000 0 9 0 9 1 1.470000000 1
4 0 0 1.470000000 0 1.470000000 1 0 1
scissors
1 2
4 1.470000000 0 6 0 6 1 1.470000000 1
4 9 0 9 1 6 1 6 0
tape
2 4 3
4 3 2 3 1 6 1 6 2
4 6 1 1.470000000 1 1.470000000 0 6 0
6 1.470000000 0 6 0 6 2 3 2 3 1 1.470000000 1
scissors
5 4
4 1.470000000 0 3 0 3 1 1.470000000 1
4 3 0 4 0 4 2 3 2
4 4 2 4 0 5 0 5 2
4 5 0 6 0 6 2 5 2
tape
5 2 6 7 8 9
4 0 0 1.470000000 0 1.470000000 1 0 1
4 1.470000000 0 3 0 3 1 1.470000000 1
4 0 2 0 1 2 1 2 2
4 0 2 2 2 2 3 0 3
4 3 3 2 3 2 1 3 1
4 0 0 3 0 3 3 0 3

Note

The figure below shows the first example output. On the left is the original figure after using the scissors, on the right are the corresponding C_i when we tape those pieces back together.

<image>

In the second example output, note that it is sufficient if the final shape is equivalent to the target one, they do not have to be identical.

The figure below shows three stages of the third example output. First, we cut the input rectangle into two smaller rectangles, then we cut the bigger of those two rectangles into two more. State after these cuts is shown in the top left part of the figure.

Continuing, we tape the two new rectangles together to form a six-sided polygon, and then we cut that polygon into three 2-by-1 rectangles and one smaller rectangle. This is shown in the bottom left part of the figure.

Finally, we take the rectangle we still have from the first step and the four new rectangles and we assemble them into the desired 3-by-3 square.

<image>
#include <bits/stdc++.h>
using namespace std;
double eps = 1e-6, pi = 3.14159265358979323846;
struct pct {
  double x, y;
  pct() {}
  pct(double x2, double y2) : x{x2}, y{y2} {}
  pct operator+(const pct p) const { return {this->x + p.x, this->y + p.y}; }
  pct *operator+=(const pct p) {
    this->x += p.x;
    this->y += p.y;
    return this;
  }
  pct operator-(const pct p) const { return {this->x - p.x, this->y - p.y}; }
  pct *operator-=(const pct p) {
    this->x -= p.x;
    this->y -= p.y;
    return this;
  }
  pct operator*(double nr) const { return {this->x * nr, this->y * nr}; }
  pct *operator*=(double nr) {
    this->x *= nr;
    this->y *= nr;
    return this;
  }
  pct operator^(double nr) const {
    return {this->x * cos(nr) - this->y * sin(nr),
            this->x * sin(nr) + this->y * cos(nr)};
  }
  double get(const pct p) const {
    double angle1 = atan2(this->y, this->x), angle2 = atan2(p.y, p.x);
    double angle = angle2 - angle1;
    while (angle < 0) angle += 2 * pi;
    while (angle > 2 * pi) angle -= 2 * pi;
    return angle;
  }
};
struct shape {
  vector<pct> v;
  shape(vector<pct> v2) : v(v2) {}
  shape(initializer_list<pct> init) : v(init) {}
  shape(int n) : v(n) {}
  shape() {}
  int sz() { return v.size(); }
  shape operator^(double c) {
    shape v2(v.size());
    for (int i = 0; i < (int)v.size(); i++) v2.v[i] = v[i] ^ c;
    return v2;
  }
};
void rotl(pct &a, pct &b, pct &c) {
  pct aux = a;
  a = b;
  b = c;
  c = aux;
}
void rotr(pct &a, pct &b, pct &c) {
  pct aux = c;
  c = b;
  b = a;
  a = aux;
}
int semn(double a) { return ((a > 0) ? 1 : ((a < 0) ? -1 : 0)); }
double dot(pct a, pct b) { return a.x * b.x + a.y * b.y; }
double dot(pct a, pct b, pct o) { return dot(a - o, b - o); }
double cross(pct a, pct b) { return a.x * b.y - b.x * a.y; }
double cross(pct a, pct b, pct o) { return cross(a - o, b - o); }
bool pcttr(pct a, pct b, pct c, pct p) {
  if (semn(cross(a, b, c)) != semn(cross(p, b, c))) return 0;
  if (semn(cross(b, c, a)) != semn(cross(p, c, a))) return 0;
  if (semn(cross(c, a, b)) != semn(cross(p, a, b))) return 0;
  return 1;
}
struct rect {
  vector<double> h, w;
  int size() { return w.size(); }
};
struct oper {
  shape start;
  shape final;
  vector<shape> part1;
  vector<shape> part2;
};
vector<oper> revert(vector<oper> v) {
  reverse(v.begin(), v.end());
  for (auto &it : v) {
    swap(it.start, it.final);
    swap(it.part1, it.part2);
  }
  return v;
}
rect calc1(shape s, vector<oper> &ops) {
  int n, i, j;
  bool ok;
  double r = 0;
  rect rasp;
  vector<pct> v = s.v;
  oper op;
  op.start = s;
  op.final = {{0, 0}};
  while (v.size() > 2) {
    n = v.size();
    for (i = 0; i < n; i++) {
      pct a = v[(i + n - 1) % n], b = v[i], c = v[(i + 1) % n];
      if (cross(b, c, a) < 0) continue;
      ok = 1;
      for (j = 0; j < n; j++) {
        if ((i - 1 - j) % n == 0 || i == j || (i + 1 - j) % n == 0) continue;
        if (pcttr(a, b, c, v[j])) ok = 0;
      }
      if (ok == 0) continue;
      double la = dot(b - c, b - c), lb = dot(a - c, a - c),
             lc = dot(a - b, a - b), cosa = (lb + lc - la) / sqrt(lb * lc) / 2,
             cosb = (la + lc - lb) / sqrt(la * lc) / 2,
             cosc = (la + lb - lc) / sqrt(la * lb) / 2;
      if (cosb < min(cosa, cosc))
        rotl(a, b, c);
      else if (cosc < min(cosa, cosb))
        rotr(a, b, c);
      la = dot(b - c, b - c), lb = dot(a - c, a - c), lc = dot(a - b, a - b),
      cosa = (lb + lc - la) / sqrt(lb * lc) / 2,
      cosb = (la + lc - lb) / sqrt(la * lc) / 2,
      cosc = (la + lb - lc) / sqrt(la * lb) / 2;
      pct mijb = (a + b) * .5, mijc = (a + c) * .5;
      double db = sqrt(lc) * cosb / 2, dc = sqrt(lb) * cosc / 2,
             w = sqrt(lc) * sqrt(1 - cosb * cosb);
      op.part1.push_back({b, b + (c - b) * (db / sqrt(la)), mijb});
      op.part1.push_back({c, mijc, c + (b - c) * (dc / sqrt(la))});
      op.part1.push_back({c + (b - c) * (dc / sqrt(la)), mijc, a, mijb,
                          b + (c - b) * (db / sqrt(la))});
      op.part2.push_back({{w, r + dc}, {w, r + dc + db}, {w / 2, r + dc + db}});
      op.part2.push_back({{w, r + dc}, {w / 2, r}, {w, r}});
      op.part2.push_back({{0, r},
                          {w / 2, r},
                          {w, r + dc},
                          {w / 2, r + dc + db},
                          {0, r + dc + db}});
      op.final.v.push_back({w, r});
      op.final.v.push_back({w, r + dc + db});
      r = r + dc + db;
      rasp.h.push_back(db + dc);
      rasp.w.push_back(w);
      v.erase(v.begin() + i);
      break;
    }
  }
  op.final.v.push_back({0, r});
  assert(op.final.sz() != 2);
  ops.push_back(op);
  return rasp;
}
rect calc2(rect s, vector<oper> &ops) {
  int n = s.size(), i;
  vector<double> &w = s.w;
  vector<double> &h = s.h;
  double area = 0, num;
  for (i = 0; i < n; i++) area += h[i] * w[i];
  num = sqrt(area);
  double curh, newh;
  while (1) {
    rect nex;
    oper op;
    curh = 0;
    newh = 0;
    op.start = ops.back().final;
    op.final = {{0, 0}};
    bool ok = 1;
    for (i = 0; i < n; i++) {
      if (w[i] < num - eps) {
        ok = 0;
        op.part1.push_back({{0, curh},
                            {w[i], curh},
                            {w[i], curh + h[i] / 2},
                            {0, curh + h[i] / 2}});
        op.part1.push_back({{0, curh + h[i] / 2},
                            {w[i], curh + h[i] / 2},
                            {w[i], curh + h[i]},
                            {0, curh + h[i]}});
        op.part2.push_back({{0, newh},
                            {w[i], newh},
                            {w[i], newh + h[i] / 2},
                            {0, newh + h[i] / 2}});
        op.part2.push_back({{w[i], newh},
                            {2 * w[i], newh},
                            {2 * w[i], newh + h[i] / 2},
                            {w[i], newh + h[i] / 2}});
        op.final.v.push_back({2 * w[i], newh});
        op.final.v.push_back({2 * w[i], newh + h[i] / 2});
        newh = newh + h[i] / 2;
        nex.w.push_back(w[i] * 2);
        nex.h.push_back(h[i] / 2);
      } else if (w[i] > 2 * num + eps) {
        ok = 0;
        op.part1.push_back({{0, curh},
                            {w[i] / 2, curh},
                            {w[i] / 2, curh + h[i]},
                            {0, curh + h[i]}});
        op.part1.push_back({{w[i] / 2, curh},
                            {w[i], curh},
                            {w[i], curh + h[i]},
                            {w[i] / 2, curh + h[i]}});
        op.part2.push_back({{0, newh},
                            {w[i] / 2, newh},
                            {w[i] / 2, newh + h[i]},
                            {0, newh + h[i]}});
        op.part2.push_back({{0, newh + h[i]},
                            {w[i] / 2, newh + h[i]},
                            {w[i] / 2, newh + 2 * h[i]},
                            {0, newh + 2 * h[i]}});
        op.final.v.push_back({w[i] / 2, newh});
        op.final.v.push_back({w[i] / 2, newh + 2 * h[i]});
        newh = newh + 2 * h[i];
        nex.w.push_back(w[i] / 2);
        nex.h.push_back(h[i] * 2);
      } else {
        op.part1.push_back(
            {{0, curh}, {w[i], curh}, {w[i], curh + h[i]}, {0, curh + h[i]}});
        op.part2.push_back(
            {{0, newh}, {w[i], newh}, {w[i], newh + h[i]}, {0, newh + h[i]}});
        op.final.v.push_back({w[i], newh});
        op.final.v.push_back({w[i], newh + h[i]});
        newh = newh + h[i];
        nex.w.push_back(w[i]);
        nex.h.push_back(h[i]);
      }
      curh = curh + h[i];
    }
    op.final.v.push_back({0, newh});
    assert(op.final.sz() != 2);
    ops.push_back(op);
    s = nex;
    if (ok) break;
  }
  return s;
}
void calc3(rect s, vector<oper> &ops) {
  oper op;
  int n = s.size();
  double curh = 0, newh = 0;
  vector<double> &w = s.w;
  vector<double> &h = s.h;
  op.start = ops.back().final;
  double area = 0;
  int i;
  for (i = 0; i < n; i++) area = area + h[i] * w[i];
  double num = sqrt(area);
  double dist, hei;
  for (i = 0; i < n; i++) {
    if (w[i] < num + eps) {
      op.part1.push_back(
          {{0, curh}, {w[i], curh}, {w[i], curh + h[i]}, {0, curh + h[i]}});
      op.part2.push_back(
          {{0, newh}, {1, newh}, {1, newh + h[i]}, {0, newh + h[i]}});
      curh = curh + h[i];
      newh = newh + h[i];
      continue;
    }
    dist = w[i] - num;
    hei = h[i] / num;
    op.part1.push_back({{0, curh}, {num, curh}, {0, curh + h[i]}});
    op.part1.push_back({{0, curh + h[i]},
                        {dist, curh + h[i] - dist * hei},
                        {dist, curh + h[i]}});
    op.part1.push_back({{dist, curh + h[i]},
                        {dist, curh + h[i] - dist * hei},
                        {num, curh},
                        {w[i], curh},
                        {w[i], curh + h[i]}});
    op.part2.push_back({{0, newh}, {num, newh}, {0, newh + h[i]}});
    op.part2.push_back({{num - dist, newh + dist * hei},
                        {num, newh},
                        {num, newh + dist * hei}});
    op.part2.push_back({{0, newh + w[i] * hei},
                        {0, newh + h[i]},
                        {num - dist, newh + dist * hei},
                        {num, newh + dist * hei},
                        {num, newh + w[i] * hei}});
    curh += h[i];
    newh += w[i] * h[i] / num;
  }
  op.final = {{0, 0}, {num, 0}, {num, newh}, {0, newh}};
  assert(op.final.sz() != 2);
  ops.push_back(op);
}
shape clea(shape s) {
  int n = s.sz(), i;
  vector<pct> rasp{s.v[0]};
  for (i = 1; i < n; i++)
    if (sqrt(dot(s.v[i] - s.v[i - 1], s.v[i] - s.v[i - 1])) > eps)
      rasp.push_back(s.v[i]);
  return shape(rasp);
}
vector<oper> solve(shape s) {
  vector<oper> rasp;
  rect r1 = calc1(s, rasp);
  rect r2 = calc2(r1, rasp);
  calc3(r2, rasp);
  return rasp;
}
void print(shape s) {
  s = clea(s);
  printf("%d ", s.v.size());
  for (auto it : s.v) printf("%.10f %.10f ", it.x, it.y);
  printf("\n");
}
shape read() {
  int n, i;
  scanf("%d", &n);
  shape rasp(n);
  for (i = 0; i < n; i++) scanf("%lf%lf", &rasp.v[i].x, &rasp.v[i].y);
  return rasp;
}
int main() {
  int curr = 0, i, ne;
  shape s, t;
  s = read(), t = read();
  vector<oper> ops1 = solve(s), ops2 = solve(t);
  ops2 = revert(ops2);
  ops1.insert(ops1.end(), ops2.begin(), ops2.end());
  for (auto it : ops1) {
    printf("scissors\n");
    printf("%d %d\n", curr, it.part1.size());
    for (auto it2 : it.part1) print(it2);
    ne = curr + it.part1.size() + 1;
    printf("tape\n");
    printf("%d ", it.part2.size());
    for (i = curr + 1; i < ne; i++) printf("%d ", i);
    printf("\n");
    for (auto it2 : it.part2) print(it2);
    print(it.final);
    curr = ne;
  }
  return 0;
}
