There are 100 equally spaced points on the circumference of a circle, numbered 1 through 100 clockwise. You are given N line segments (chords) whose endpoints are among these points. Find the maximum number of given chords that can be chosen so that no two chosen chords intersect.
Here, 1 ≤ N ≤ 50, and each point appears as an endpoint of at most one chord.
The first line contains the number of chords N. Each of the next N lines contains the two endpoint numbers of one chord.
Print the maximum number of chords that can be chosen with no intersections between any two of them.
There is no additional hint.