Crowded line

You are given n points on the plane. You have the guarantee that there
exists at least one line that contains at least 20% of the n given
points. Find any such line.

Input

Input consists of several cases, with only integer numbers, each one
with n, followed by n different pairs (x, y). There is at least one line
with at least ⌈n/5⌉ of the given points. Assume 2 ≤ n ≤ 10⁵, and that no
given coordinate is larger than 10⁶ in absolute value.

Output

For every case, print information about the line you found: The number m
of all the given points that belong to your line, followed by all those
m points in any order. The number m must be at least 2 and also at least
⌈n/5⌉. If there is more than one possible line, choose any one. Follow
strictly the format of the sample output.

Problem information

Author: Ivan Geffner

Generation: 2026-01-25T11:35:57.297Z

© Jutge.org, 2006–2026.
https://jutge.org
