LaLa has a pile of magic circles in her laboratory.
A magic circle can be represented as a simple polygon drawn with special ink, and is usable if and only if it is convex. i.e. all of its internal angles are equal or less than π.
LaLa plans to turn every magic circle into a usable one. However, it may lose all its magical power if done incorrectly. Thankfully, LaLa has the perfect magical tool for that.
The tool works as follows. When you toss in a magic circle, if it's usable, it reports that it is. Otherwise, it takes two distinct points u and v such that
And then it rotates the u-v path by π around the midpoint of u and v. In other words, for each point w on the u-v path, w becomes u+v−w where the addition is done coordinate-wise over the two dimensional coordinate system over the paper the magic circle is drawn on. Note that the result of this modification is also a simple polygon.
LaLa got annoyed by how long it takes to convert them. In order to finish and take a nap ASAP, LaLa made the following observations.
Therefore, LaLa doesn't have to manually turn magic circles into usable ones with the tool. Instead, LaLa will compute the usable magic circle that can be made from the initial magic circle by a sequence of modifications by the tool and modify it in one go.
Write a program to help LaLa compute the final magic circle so that she can go take a nap.
The input is given in the following format:
N
x_0 y_0
x_0 y_0
⋮
x_N−1 y_N−1
where the initial magic circle is the union of N line segments connecting points (x_i,y_i) and (x_(i+1modN),y_(i+1modN)) for all integers 0≤i<N.
The input satisfies the following constraints:
The output should be in the following format:
M
z_0 w_0
z_1 w_1
⋮
z_M−1 w_M−1
where the final usable magic circle is the union of M line segments connecting points (z_i,w_i) and (z_(i+1modM),w_(i+1modM)) for all integers 0≤i<M,
The output should satisfy the following constraints:
It can be proved that the output satisfying the above constraints is unique.
The following illustrates the initial magic circle for the first sample.

The following illustrates the sequence of usage of the tool to make it usable. The dotted part of the boundary is the path modified by the tool, which becomes the red part after the modification.
| Step 0 | Step 1 |
|---|---|
![]() | ![]() |
| Step 2 | Step 3 |
![]() | ![]() |
| Step 4 | |
![]() |