YHZ has n teams for selection. Each team has three attributes.
A team can be selected to the competition if and only if there is no other teams that can beat it in all three attributes.
The input contains a single test case.
The first line, a number n , the number of teams.
The following n lines, each line contains three numbers, indicating the attributes of each team.
Output the maximum teams YHZ can select for the competition.
3 1 2 3 2 3 1 3 1 2
3
4 1 1 3 2 2 4 3 3 1 4 4 2
2
1 \leq n \leq 3 \cdot 10^5
We guarantee the value of each attribute is a permutation of 1 - n .