Codeforces Round 358 (Div. 2)
E
Alyona and Triangles
Codeforces
2600
原题
← D→
翻译中…

You are given $*n*$ points with integer coordinates on the plane. Points are given in a way such that there is no triangle, formed by any three of these $*n*$ points, which area exceeds $*S*$.

翻译中…

Alyona tried to construct a triangle with integer coordinates, which contains all $*n*$ points and which area doesn't exceed $4*S*$, but, by obvious reason, had no success in that. Please help Alyona construct such triangle. Please note that vertices of resulting triangle are not necessarily chosen from $*n*$ given points.

翻译中…

Input

翻译中…

In the first line of the input two integers $*n*$ and $*S*$ ($3 ≤ *n* ≤ 5000$, $1 ≤ *S* ≤ 10^{18}$) are given — the number of points given and the upper bound value of any triangle's area, formed by any three of given $*n*$ points.

翻译中…

The next $*n*$ lines describes given points: $*i*^{*th*}$ of them consists of two integers $*x*_{*i*}$ and $*y*_{*i*}$ $( - 10^{8} ≤ *x*_{*i*}, *y*_{*i*} ≤ 10^{8})$ — coordinates of $*i*^{*th*}$ point.

翻译中…

It is guaranteed that there is at least one triple of points not lying on the same line.

翻译中…

Output

翻译中…

Print the coordinates of three points — vertices of a triangle which contains all $*n*$ points and which area doesn't exceed $4*S*$.

翻译中…

Coordinates of every triangle's vertex should be printed on a separate line, every coordinate pair should be separated by a single space. Coordinates should be an integers not exceeding $10^{9}$ by absolute value.

翻译中…

It is guaranteed that there is at least one desired triangle. If there is more than one answer, print any of them.

翻译中…

Note

翻译中…

image

翻译中…

样例

Input #1
4 1
0 0
1 0
0 1
1 1
Output #1
-1 0
2 0
0 2
InputCopy OutputCopy
题目信息
题号
682E
时间限制
3 s
内存限制
256 MB
标签
计算几何
双指针

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。