## Bubble Cup V8 E Spectator Riots

View as PDF

Points: 25
Time limit: 0.3s
Memory limit: 128M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

It's riot time on football stadium Ramacana! Raging fans have entered the field and the police find themselves in a difficult situation. The field can be represented as a square in the coordinate system defined by two diagonal vertices in and . The sides of that square are also considered to be inside the field, everything else is outside.

In the beginning, there are fans on the field. For each fan we are given his speed, an integer as well as his integer coordinates . A fan with those coordinates might move and after one second he might be at any point where . are both integers.

Points that go outside of the square that represents the field are excluded and all others have equal probability of being the location of that specific fan after one second.

Andrej, a young and promising police officer, has sent a flying drone to take a photo of the riot from above. The drone's camera works like this:

1. It selects three points with integer coordinates such that there is a chance of a fan appearing there after one second. They must not be collinear or the camera won't work. It is guaranteed that not all of the initial positions of fans will be on the same line.
2. Camera focuses those points and creates a circle that passes through those three points. A photo is taken after one second (one second after the initial state).
3. Everything that is on the circle or inside it at the moment of taking the photo (one second after focusing the points) will be on the photo.

Your goal is to select those three points so that the expected number of fans seen on the photo is maximized. If there are more such selections, select those three points that give the circle with largest radius among them. If there are still more suitable selections, any one of them will be accepted.

#### Input Specification

The first line contains the number of fans on the field, . The next lines contain three integers: . They are the -coordinate, -coordinate and speed of fan at the beginning of the one second interval considered in the task.

#### Output Specification

You need to output the three points that camera needs to select. Print them in three lines, with every line containing the -coordinate, then -coordinate, separated by a single space. The order of points does not matter.

3
1 1 1
1 1 1
1 2 1

2 2
2 1
1 0

#### Explanation

The circle defined in output will catch all of the fans, no matter how they move during one second.