Convex hull#4279

Convex hull

1 second
64 megabytes
Hard

You are given a set of points on the plane.

Find their convex hull.

Input

The first line contains the integer (3 \leq n \leq 200000) — the number of points. Each of the next lines describes a point: the -th line contains two integers — the coordinates of the -th point. The coordinates do not exceed 10^9 in absolute value. It is guaranteed that not all points lie on a single straight line. Points may coincide.

Output

Print the number of vertices of the convex hull on the first line. On the second line, print the indices of the vertices (in counterclockwise order), separated by spaces, as they appear on the convex hull. No two edges of the convex hull should be collinear.

On the third line, print the perimeter of the hull, and on the fourth line, print its area.

The perimeter must be printed with an absolute or relative error no greater than 10^{-9}. The area must be printed with absolute precision.

Examples

Example 1

Loading
Loading