Paul has a huge problem caused by the presence of bugs in his house and now he must kill the colonies of bugs that have infested his house. Since he is a very abstract person, he lives in a -dimensional cube, where every position can be represented as an array of coordinates with integer values ranging from to . A colony of bugs is represented by its position.
Since bugs are social entities, they try to unify the colonies. Thereby, if two colonies are adiacent in the house (the position of one is obtained by adding or subtracting from a single coordinate of the position of the other), they build a tunnel, unifying the colonies. Paul knows the positions of the colonies, and he wishes to block all the tunnels between them. In order to do that he can buy special sprays.
There are types of sprays, using the type will destroy all the tunnels that have one of its ends in the colony. Paul needs to know the minimum number of sprays he needs in order to block all the tunnels.
Input data
The first line will contain the numbers , , . On the next lines there are numbers between and representing the position of each colony.
Output data
On the first and only line you will print the minimum number of sprays needed to block all the tunnels.
Constraints and clarifications
- It is guaranteed that any two colonies have distinct positions.
- For tests worth points:
Example
stdin
5 3 4
1 1 1
1 1 2
1 1 3
1 2 1
1 2 3
stdout
2
Explanation
We will buy two sprays: one of type and one of type .