ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

Ural SU and Orel STU contest. Petrozavodsk training camp. Summer 2006

About     Problems     Submit solution     Judge status     Standings
Contest is over

J. Airplanes

Time limit: 1.0 second
Memory limit: 64 MB
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 (0, 0, 0) and radius 6370 kilometers. Most passenger planes fly at a height not more than 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 N planes in the air. A plane number i is at the point of intersection of the Earth sphere with the ray starting at the origin and having directing vector (Xi, Yi, Zi). 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.

Input

The first line contains an integer N (1 ≤ N ≤ 200). The next N lines contain triples of integers Xi, Yi, Zi, which are directing vectors of the rays passing through the planes. The absolute values of these numbers do not exceed 600, and each triple contains at least one nonzero number.

Output

You should output the maximal number of planes that can be seen simultaneously from a very large distance from the Earth.

Sample

inputoutput
6
0 0 1
0 0 -1
0 1 0
0 -1 0
1 0 0
-1 0 0
3
Problem Author: Dmitry Ivankov
Problem Source: Ural SU and Orel STU Contest. Petrozavodsk Summer Session, August 2006
To submit the solution for this problem go to the Problem set: 1477. Airplanes