logo AlgoBeat OnlineJudge
登录 注册

#206158. [NEERC 2013] Easy Geometry

内存限制:500 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

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.

输入格式

The first line contains a single integer -- the number of sides of the polygon . The following lines contain Cartesian coordinates of the polygon's vertices -- two integers and per line. Vertices are given in the clockwise order.

The polygon is convex.

输出格式

Output four real numbers and -- the coordinates of two rectangle's corners The rectangle must fit into the polygon and have the maximum possible area.

The absolute precision of the coordinates should be at least

The absolute or relative precision of the rectangle area should be at least That is, if ; is the actual maximum possible area, the following must hold:

样例

样例输入 1

4
5 1
2 4
3 7
7 3

样例输出 1

3.5 2.5 5.5 4.5

样例输入 2

5
1 1
1 4
4 7
7 4
7 1

样例输出 2

1 1 7 4

数据范围与提示

Time limit: 1 s, Memory limit: 128 MB.