402388: GYM100741 J Empty Circle
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
J. Empty Circletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
You are given a set of n points S = {p1, p2, ..., pn} on the plane. A triple (pi, pj, pk) is called good if no point in S is strictly inside the circumference of these three points. If it is possible, find a good triple!
InputThe first line contains an integer n, the number of the points (3 ≤ n ≤ 106). The i-th of the next n lines contains two integer numbers xi and yi, the coordinates of pi ( - 104 ≤ xi, yi ≤ 104). No two given points will be equal.
OutputIf a good triple exists, output "Yes" in the first line. In the next line output three space-separated integers, the numbers of the three points as they appeared in the input.
If no good triple exists, output "No" in a single line.
ExamplesInput4Output
0 1
0 0
-1 -1
1 -1
YesInput
3 1 2
3Output
-1 -1
0 0
1 1
NoInput
4Output
-2 -2
2 -2
-2 2
2 2
Yes
1 3 2