Tigers

No attempts yetTime limit1sMemory limit512 MB

Problem

The tigers of Byteland are remarkable animals, and their unusual habits have long fascinated zoologists and mathematicians alike. It was recently discovered that they divide into distinct species. We call a tiger a kk-tiger if, whenever it meets a tiger at least kk times smaller than itself, it attacks and eats it, yet it never dares to touch any tiger larger than itself. In other words, a kk-tiger of size rr eats a tiger of size ss exactly when rksr \ge k \cdot s.

The Byteland zoo is home to nn tigers. Space is scarce, so the director wants to assign the animals to as few enclosures as possible while making absolutely sure that no tiger is ever eaten. Two tigers may share an enclosure only if neither of them would eat the other. Help the director find the smallest number of enclosures that suffices.

Input

The first line of the standard input contains a single integer nn (1n5000001 \le n \le 500\,000), the number of tigers in the zoo. Each of the next nn lines describes one tiger with two integers rir_i and kik_i (1ri10000000001 \le r_i \le 1\,000\,000\,000, 2ki10000002 \le k_i \le 1\,000\,000) separated by a single space: the ii-th tiger is a kik_i-tiger of size rir_i.

Output

Print to the standard output a single integer: the smallest number of enclosures into which all tigers can be safely assigned.

Hint

Explanation of the sample. The tigers of sizes 2828, 1818, and 1515 can live together in enclosure 11, and the tigers of sizes 1010 and 88 can be kept in enclosure 22, so two enclosures are enough.