Convex hull#4781

Convex hull

1 second
64 megabytes
Hard

In a plane, you are given points.

Your task is to construct the convex hull for this set of points and then calculate and output two values: the perimeter and the area of the convex hull.

Input

The first line contains the integer , where 1 \leq N \leq 20000. Each of the next lines provides two integers, representing the coordinates x_i and y_i. All coordinate values do not exceed 10^4 in absolute value.

Output

Output two numbers: the perimeter and the area of the convex hull, each with a precision of at least decimal places.

Examples

Example 1

Loading
Loading