Lucky Landing

Time limit: 1s Memory limit: 256MB Input: Output:

Task

Two players, called Alunelu and Bocuțu, have luckily landed in Lucky Landing and have to loot the region.

We know that the path followed by each of the two players is a strictly convex polygon. Determine any two paths that the two players can follow such that they intersect in exactly nn points.

More formally, you are given a positive integer nn.

Determine any two strictly convex polygons AA and BB which satisfy the following constraints:

  • Both AA and BB must have between 33 and 1 0001 \ 000 vertices.
  • The vertices of both AA and BB must have integer coordinates which do not exceed 10910^9 in absolute value.
  • There are exactly nn points which belong to both of the polygons' contours.

Input data

The first line of input contains a single integer nn (3n1003 \le n \le 100) - the desired number of intersections between the two polygons.

Output data

On the first line, print the number of vertices mm (3m10003 \le m \le 1000) of the first polygon.

On each of the next mm lines, print two integers xix_i and yiy_i (109xi,yi109-10^9 \le x_i, y_i \le 10^9) - the coordinates of the ii-th vertex from the first polygon.

On the next line, print the number of vertices pp (3p10003 \le p \le 1000) of the second polygon.

On each of the next pp lines, print two integers aia_i and bib_i (109ai,bi109-10^9 \le a_i, b_i \le 10^9) - the coordinates of the ii-th vertex from the second polygon.

Additionally, for each polygon:

  • The points must be given in either clockwise or anti-clockwise order.
  • No three consecutive points should be collinear.
  • The points must, in the order they are given, be the vertices of a non-intersecting convex polygon.

Example 1

stdin

3

stdout

5
2 2
3 1
4 1
4 3
3 3
6
1 2
2 1
3 1
4 2
3 3
2 3

Explanation

The polygons from the first example are pictured as follows:

Example 2

stdin

4

stdout

4
1 1
1 5
5 5
5 1
3
1 1
7 3
3 7

Explanation

The polygons from the second example are pictured as follows:

Log in or sign up to be able to send submissions!