Codeforces Round 503 (by SIS, Div. 1)
D
Large Triangle
Codeforces
2700
原题
← CE →
翻译中…

There is a strange peculiarity: if you connect the cities of Rostov, Taganrog and Shakhty, peculiarly, you get a triangle«Unbelievable But True»

翻译中…

Students from many different parts of Russia and abroad come to Summer Informatics School. You marked the hometowns of the SIS participants on a map.

翻译中…

Now you decided to prepare an interesting infographic based on this map. The first thing you chose to do is to find three cities on this map, such that they form a triangle with area $S$.

翻译中…

Input

翻译中…

The first line of input contains two integers $n$ and $S$ ($3 \le n \le 2000$, $1 \le S \le 2 \cdot 10^{18}$) — the number of cities on the map and the area of the triangle to be found.

翻译中…

The next $n$ lines contain descriptions of the cities, one per line. Each city is described by its integer coordinates $x_i$, $y_i$ ($-10^9 \le x_i, y_i \le 10^9$).

翻译中…

It is guaranteed that all cities are located at distinct points. It is also guaranteed that no three cities lie on the same line.

翻译中…

Output

翻译中…

If the solution doesn't exist — print «No».

翻译中…

Otherwise, print «Yes», followed by three pairs of coordinates $(x, y)$ — the locations of the three cities, which form the triangle of area $S$.

翻译中…

样例

Input #1
3 7
0 0
3 0
0 4
Output #1
No
InputCopy OutputCopy
Input #2
4 3
0 0
2 0
1 2
1 3
Output #2
Yes
0 0
1 3
2 0
InputCopy OutputCopy
题目信息
题号
1019D
时间限制
3 s
内存限制
256 MB
标签
二分
计算几何
排序

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