Problem E: Mickle's Beam

Major Mickle is commanded to protect a secret base which is being attacked by N tanks. Mickle has an ultimate laser rifle called Mickle's beam. Any object shot by this beam will be immediately destroyed, and there is no way for protection. Furthermore, the beam keeps going through even after destroying objects. The beam is such a powerful and horrible weapon, but there is one drawback: the beam consumes a huge amount of energy. For this reason, the number of shots should be always minimized.

Your job is to write a program that calculates the minimum number of shots required to destroy all the enemy tanks.

You can assume the following:

Input

The input consists of an integer sequence.

The first integer indicates N (N ≤ 2,000). Each of the following N lines contains four integers which indicates the x- and y-coordinates of the lower-left corner and the upper-right corner of a tank respectively. You can assume that every coordinate may not exceed 10,000 in absolute value.

Output

Output the minimum number of shots of the beam.

Sample Input and Output

Input #1

4
2 -1 3 1
-1 2 1 3
-3 -1 -2 1
-1 -3 1 -2

Output #1

4

Input #2

2
1 0 2 1
3 -1 4 0

Output #2

1