{"raw_statement":[{"iden":"problem statement","content":"There are $N$ robots numbered $1$ to $N$ placed on a number line. Robot $i$ is placed at coordinate $X_i$. When activated, it will travel the distance of $D_i$ in the positive direction, and then it will be removed from the number line. All the robots move at the same speed, and their sizes are ignorable.\nTakahashi, who is a mischievous boy, can do the following operation any number of times (possibly zero) as long as there is a robot remaining on the number line.\n\n*   Choose a robot and activate it. This operation cannot be done when there is a robot moving.\n\nWhile Robot $i$ is moving, if it touches another robot $j$ that is remaining in the range $[X_i, X_i + D_i)$ on the number line, Robot $j$ also gets activated and starts moving. This process is repeated recursively.\nHow many possible sets of robots remaining on the number line are there after Takahashi does the operation some number of times? Compute this count modulo $998244353$, since it can be enormous."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2 \\times 10^5$\n*   $-10^9 \\leq X_i \\leq 10^9$\n*   $1 \\leq D_i \\leq 10^9$\n*   $X_i \\neq X_j (i \\neq j)$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$X_1$ $D_1$\n$:$\n$X_N$ $D_N$"},{"iden":"sample input 1","content":"2\n1 5\n3 3"},{"iden":"sample output 1","content":"3\n\nThere are three possible sets of robots remaining on the number line: ${1, 2}$, ${1}$, and ${}$.\nThese can be achieved as follows:\n\n*   If Takahashi activates nothing, the robots ${1, 2}$ will remain.\n    \n*   If Takahashi activates Robot $1$, it will activate Robot $2$ while moving, after which there will be no robots on the number line. This state can also be reached by activating Robot $2$ and then Robot $1$.\n    \n*   If Takahashi activates Robot $2$ and finishes doing the operation, the robot ${1}$ will remain."},{"iden":"sample input 2","content":"3\n6 5\n-1 10\n3 3"},{"iden":"sample output 2","content":"5\n\nThere are five possible sets of robots remaining on the number line: ${1, 2, 3}$, ${1, 2}$, ${2}$, ${2, 3}$, and ${}$."},{"iden":"sample input 3","content":"4\n7 10\n-10 3\n4 3\n-4 3"},{"iden":"sample output 3","content":"16\n\nNone of the robots influences others."},{"iden":"sample input 4","content":"20\n-8 1\n26 4\n0 5\n9 1\n19 4\n22 20\n28 27\n11 8\n-3 20\n-25 17\n10 4\n-18 27\n24 28\n-11 19\n2 27\n-2 18\n-1 12\n-24 29\n31 29\n29 7"},{"iden":"sample output 4","content":"110\n\nRemember to print the count modulo $998244353$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}