Build a Boat

Split a simple polygon into the largest number of equal-area vertical sections, each of area at least C, and print the bulkhead x-coordinates.

Medium7GeometryPrefix sumBinary searchNo attempts yetTime limit2sMemory limit512 MB

Problem

A modern ship survives a collision because of its bulkheads, reinforced vertical walls inside the hull that keep water that has come in from spreading to other sections.

A design team finished the outline of the cross section of a new ship and left the bulkheads out. Placing them is your job.

The cross section is a simple polygon. A bulkhead is a vertical segment that cuts the whole cross section at one x-coordinate, so a set of bulkheads splits the cross section into vertical sections. Every section must have the same area, and that area must be at least CC.

Find the largest number of sections MM that can be made this way, then report where the bulkheads go.

Input

The first line has an integer CC (10C10910 \le C \le 10^9), the minimum area of one section.

The second line has an integer NN (3N1053 \le N \le 10^5), the number of vertices of the outline.

Each of the next NN lines has two integers xx and yy (104x,y104-10^4 \le x, y \le 10^4), the coordinates of one vertex of the hull. The vertices come in counter-clockwise order.

The outline never doubles back on itself horizontally. A vertical line drawn anywhere passes through the cross section exactly once, never twice.

One section of area CC always fits, and the number of sections MM is between 1 and 100.

Output

On the first line print MM, the largest number of sections of equal area whose common area is at least CC.

Then print M1M - 1 lines. Line kk holds the x-coordinate of the kk-th bulkhead, placed so that all MM sections have the same area. Print the coordinates in increasing order, each with exactly six digits after the decimal point.