- Time limit: 1.00 s
- Memory limit: 512 MB
You are the chair of the board of the organization that organizes the famous annual car race Hyperdrive Invitational International Tournament (HIIT). The cars for the contest are provided by the organization, but unfortunately all of their steering wheels are broken, and therefore the cars can only be steered left. The contest date is rapidly approaching, and a board member comes to you with a suggestion: If the cars only need to turn left on the race track, the race can be organized.
The race is organized in a very large desert with n points of interest, and as per tradition, the race track should be a four-sided polygon whose corners are some points of interest. To deal with the issues with the steering wheels, each internal angle should be between 0 and 180 degrees. This includes the start of the race, since the race lasts for multiple laps. Finally, the track cannot intersect with itself to prevent the cars from colliding. You can assume there are no three points of interest on any possible line.
Input
The first line of the input has the number of points of interest, n.
The following n lines contain two integers x and y, describing the x and y coordinates for each point of interest.
Output
If no valid race track exists, output "NO". Otherwise, output "YES" followed by the coordinates of the four corners of the race track in the order that they are to be raced.
Constraints
- 1 \le n \le 10^5
- |x|, |y| \le 10^9
Example
Input:
4 0 0 1 1 0 1 1 0
Output:
YES 0 0 1 0 1 1 0 1
Explanation: The chosen points form a rectangle satisfying the constraints.
