E. The Best among Equals
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

A university in Samara has held a qualification contest in figure programming, but the jury can't come to terms how many teams should take part in the next stage of the contest. In figure programming a judge system doesn't evaluate the scores precisely and just set an interval which the score can belong to. Jury is able to evaluate any participant with any score from this interval. There are n teams that took part in the contest, and the i-th of them has the score in the interval from li to ri, inclusively. Jury wants the number of qualified teams to be as large as possible, but they have to get the maximal score among all teams. What is the maximal number of teams that can take part in the next stage of the contest under such circumstances?

Input

The first line contains a single integer n (1 ≤ n ≤ 2·105) — the number of teams in the contest.

Each of the next n lines contains two space-separated integers: li and ri ( - 109 ≤ li ≤ ri ≤  + 109) — the lower and upper bounds of the score for the i-th team.

Output

Output a single integer — the maximal number of teams that can get the maximal score.

Example
Input
3
1 3
2 4
4 5
Output
2