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. 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 input file contains several test cases, each of them as described below. The first line contains a single integer n — the number of sides of the polygon (3 ≤ n ≤ 100000). The following n lines contain Cartesian coordinates of the polygon’s vertices — two integers xi and yi (−109 ≤ xi, yi ≤ 109) per line. Vertices are given in the clockwise order. The polygon is convex. Output The input file contains several test cases, each of them as described below. 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(|A − A′|, |A−A | ) ≤ 10−5. Sample Input 4 51 24 37 73 5 11 14 A ′

2/2 47 74 71 Sample Output 3.5 2.5 5.5 4.5 1174