Under construction

Still being built. Things may change

Biology

Time limit1sMemory limit1024 MB

Summary
Construct 16 points and a planar straight-line graph on them with more than 300000 simple polygons formed by its edges.
Level

Hard9 of 10

Topics
Geometry, Graph, Combinatorics
Solved
No attempts yet

Statement

Android Vasya prepares a research work in Biology. In this work he studies the class of arachnoids. Vasya is not interested in spiders themselves. His work focuses on the webs made by different species of spiders.

Vasya has already found out how a web is made. A web is a set of points called web knots, connected by so-called fibres. The knots can be seen as coplanar points. Each fibre is a line segment that connects two knots. The fibres cross only at knots.

Vasya wants to determine which spiders make the webs of highest quality. For this he defines the stickiness of a web as the number of different traps in it. A trap is a polygon whose vertices are web knots and whose edges are fibres. It has no self-crossings and no self-tangencies.

Vasya analysed several webs with 16 knots. Their stickiness is between 5 0005\,000 and 300 000300\,000. Now he wants to know what a web with 16 knots and stickiness greater than 300 000300\,000 can look like.

Input

There is no input data in this task.

Output

In the first 16 lines, output the coordinates of the web knots as integer pairs xix_i, yiy_i (−1000≤xi,yi≤1000-1000 \leq x_i, y_i \leq 1000). In the next 16 lines, output the adjacency matrix of the web, a 16×1616 \times 16 table of the symbols 0 and 1. The matrix must be symmetric, and its main diagonal must be filled with zeros.

Any two knots must lie at different points. Knots cannot lie on the inner points of fibres. Any two fibres may cross only at their common knot.

The web must have stickiness greater than 300 000300\,000. It is guaranteed that such webs exist.

Hint

The answer in the example is not correct. It only illustrates the output format. Note that you must output a web with 16 knots, not 6. The picture above corresponds to the example. The stickiness of the example web is only 21.

Examples1

  1. Example 1

    Input
    Expected output
    0 0
    5 -6
    -5 -6
    -9 3
    0 8
    9 3
    011111
    101001
    110100
    101010
    100101
    110010