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 k-tiger if, whenever it meets a tiger at least k times smaller than itself, it attacks and eats it, yet it never dares to touch any tiger larger than itself. In other words, a k-tiger of size r eats a tiger of size s exactly when r≥k⋅s.
The Byteland zoo is home to n 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.
The first line of the standard input contains a single integer n (1≤n≤500000), the number of tigers in the zoo. Each of the next n lines describes one tiger with two integers ri and ki (1≤ri≤1000000000, 2≤ki≤1000000) separated by a single space: the i-th tiger is a ki-tiger of size ri.
Print to the standard output a single integer: the smallest number of enclosures into which all tigers can be safely assigned.
Explanation of the sample. The tigers of sizes 28, 18, and 15 can live together in enclosure 1, and the tigers of sizes 10 and 8 can be kept in enclosure 2, so two enclosures are enough.