Cow Jog

No attempts yetTime limit1sMemory limit256 MB

Problem

The cows are out exercising their hooves again. NN cows are jogging on an infinitely long single-lane track (1N1000001 \le N \le 100\,000). Every cow starts at a different position, and some cows jog at different speeds.

The track has only one lane, so a cow cannot pass the cow ahead of her. When a faster cow catches up to the cow ahead, she slows down to avoid running into her and becomes part of the same group.

The cows run for TT minutes (1T1091 \le T \le 10^9). Determine how many groups are left at that point. Two cows count as the same group if they are at the same position at the end of the TT minutes.

Input

The first line contains the two integers NN and TT.

Each of the next NN lines contains the starting position and the speed of one cow. The position is a nonnegative integer and the speed is a positive integer, and both are at most 1 billion. All cows start at different positions, and the positions are given in increasing order.

Output

Print a single integer, the number of groups that remain after TT minutes.