eolymp
bolt
Try our new interface for solving problems
Problems

Easy Geometry

Easy Geometry

Eva studies geometry. The current topic is about convex polygons, but Eva prefers rectangles. Eva's workbook contains drawings of several convex polygons and she is curious what is the area of the maximum rectangle that fits inside each of them.

prb7639.gif

Help Eva! Given the convex polygon, find the rectangle of the maximum possible area that fits inside this polygon. Sides of the rectangle must be parallel to the coordinate axes.

Input

The first line contains a single integer n (3n100 000) - the number of sides of the polygon. The following n lines contain Cartesian coordinates of the polygon's vertices - two integers xi and yi (-109xi, yi109) per line. Vertices are given in the clockwise order. The polygon is convex.

Output

Output four real numbers xmin, ymin, xmax and ymax - the coordinates of two rectangle's corners (xmin < xmax, ymin < ymax). The rectangle must fit into the polygon and have the maximum possible area.

The absolute precision of the coordinates should be at least 10-5.

The absolute or relative precision of the rectangle area should be at least 10-5 That is, if A' is the actual maximum possible area, the following must hold: min(|AA'|, |A - A'| / A') ≤ 10-5.

Time limit 1 second
Memory limit 128 MiB
Input example #1
4
5 1
2 4
3 7
7 3
Output example #1
2.527257343310017 3.472742656689983
4.527257275481722 5.472742724518278
Input example #2
5
1 1
1 4
4 7
7 4
7 1
Output example #2
1.0001459926316145 1.0
6.999853887687845 4.000145992631615
Source 2013 ACM NEERC, Semifinals, December 1, Problem E