403158: GYM101055 A Anubis' Cannonballs
Description
Anubis is worried, french soldiers are practicing target shooting with cannonballs on the sphinxes again! This time he will try to stop that the other parts of the sphinx will have the same fate as its nose.
To stop the cannons, he can summon thunderbolts that destroy everything they touch, including cannonballs. But Egyptian gods do not have as much followers as they once had, and that limits their powers.
Anubis can only summon thunderbolts in a specific moment of time. Luckily, this moment is the same moment the cannonballs are in the air. Anubis will use this chance to destroy the maximum possible number of cannonballs.
To summon the bolts, Anubis needs to temporarily shift to our plane of existence. Therefore, he can only hit targets that are in the same plane.
Help Anubis destroy the greatest possible number of cannonballs.
InputThe first line has a single integer N, the number of cannonballs. Each of the next N lines has 3 integers xi, yi and zi, the position of the ith cannonball in the moment Anubis can summon the thunderbolts.
Limits
- 1 ≤ N ≤ 50
- |xi|, |yi|, |zi| ≤ 103
- Two cannonballs can coincide
Print a single integer, the greatest number of cannonballs Anubis can destroy.
ExamplesInput3Output
0 0 0
0 0 0
0 0 0
3Input
3Output
0 0 0
1 1 1
2 2 2
3Input
4Output
1 0 0
0 1 0
0 0 1
1 1 1
3