eolymp
bolt
Try our new interface for solving problems
Problems

Airplanes

Airplanes

Probably, you visited airports in which airplanes take off every minute or even more frequently. And did you ever imagine how many airplanes there are in the air simultaneously? And what about the whole globe? Assume that the Earth is an ideal ball with center at (\textbf{0}, \textbf{0}, \textbf{0}) and radius \textbf{6370} kilometers. Most passenger planes fly at a height not more than \textbf{15} kilometers. If you could look at the Earth from the outside, the planes would look as points on its surface. Suppose that at some moment there are \textbf{N} planes in the air. A plane number \textbf{i} is at the point of intersection of the Earth sphere with the ray starting at the origin and having directing vector (\textbf{X_i}, \textbf{Y_i}, \textbf{Z_i}). There is not more than one plane at each point of the Earth's surface. You task is to determine the maximal number of planes that can be seen simultaneously from a very large distance from the Earth. From this distance, an open hemisphere of the Earth's surface can be observed. \InputFile The first line contains an integer \textbf{N} (\textbf{1} ≤ \textbf{N} ≤ \textbf{200}). The next \textbf{N} lines contain triples of integers \textbf{X_i}, \textbf{Y_i}, \textbf{Z_i}, which are directing vectors of the rays passing through the planes. The absolute values of these numbers do not exceed \textbf{600}, and each triple contains at least one nonzero number. \OutputFile You should output the maximal number of planes that can be seen simultaneously from a very large distance from the Earth.
Time limit 1 second
Memory limit 64 MiB
Author Dmitry Ivankov
Source Ural SU and Orel STU Contest. Petrozavodsk Summer Session, August 2006