{"raw_statement":[{"iden":"problem statement","content":"Silver Fox is fighting with $N$ monsters.\nThe monsters are standing in a row, and we can assume them to be standing on a number line. The $i$\\-th monster, standing at the coordinate $X_i$, has the _health_ of $H_i$.\nSilver Fox can use bombs to attack the monsters. Using a bomb at the coordinate $x$ decreases the healths of all monsters between the coordinates $x-D$ and $x+D$ (inclusive) by $A$. There is no way other than bombs to decrease the monster's health.\nSilver Fox wins when all the monsters' healths become $0$ or below.\nFind the minimum number of bombs needed to win."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2 \\times 10^5$\n*   $0 \\leq D \\leq 10^9$\n*   $1 \\leq A \\leq 10^9$\n*   $0 \\leq X_i \\leq 10^9$\n*   $1 \\leq H_i \\leq 10^9$\n*   $X_i$ are distinct.\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $D$ $A$\n$X_1$ $H_1$\n$:$\n$X_N$ $H_N$"},{"iden":"sample input 1","content":"3 3 2\n1 2\n5 4\n9 2"},{"iden":"sample output 1","content":"2\n\nFirst, let us use a bomb at the coordinate $4$ to decrease the first and second monsters' health by $2$.\nThen, use a bomb at the coordinate $6$ to decrease the second and third monsters' health by $2$.\nNow, all the monsters' healths are $0$. We cannot make all the monsters' health drop to $0$ or below with just one bomb."},{"iden":"sample input 2","content":"9 4 1\n1 5\n2 4\n3 3\n4 2\n5 1\n6 2\n7 3\n8 4\n9 5"},{"iden":"sample output 2","content":"5\n\nWe should use five bombs at the coordinate $5$."},{"iden":"sample input 3","content":"3 0 1\n300000000 1000000000\n100000000 1000000000\n200000000 1000000000"},{"iden":"sample output 3","content":"3000000000\n\nWatch out for overflow."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}