{"raw_statement":[{"iden":"problem statement","content":"Takahashi has a secret integer sequence $a$. You know that the length of $a$ is $N$.\nYou want to guess the contents of $a$. He has promised to give you the following $Q$ additional pieces of information.\n\n*   The $i$\\-th information: the value $a_{l_i}+a_{l_i+1}+\\cdots+a_{r_i}$.\n\nIs it possible to determine the sum of all elements in $a$, $a_1+a_2+\\cdots+a_N$, if the $Q$ pieces of promised information are given?"},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2 \\times 10^5$\n*   $1 \\leq Q \\leq \\min(2 \\times 10^5,\\frac{N(N+1)}{2})$\n*   $1 \\leq l_i \\leq r_i \\leq N$\n*   $(l_i,r_i) \\neq (l_j,r_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$ $Q$\n$l_1$ $r_1$\n$l_2$ $r_2$\n$\\hspace{0.4cm}\\vdots$\n$l_Q$ $r_Q$"},{"iden":"sample input 1","content":"3 3\n1 2\n2 3\n2 2"},{"iden":"sample output 1","content":"Yes\n\nFrom the first and second information, we can find the value $a_1+a_2+a_2+a_3$. By subtracting the value of $a_2$ from it, we can determine the value $a_1+a_2+a_3$."},{"iden":"sample input 2","content":"4 3\n1 3\n1 2\n2 3"},{"iden":"sample output 2","content":"No\n\nWe can determine the sum of the first $3$ elements of $a$, but not the sum of all elements."},{"iden":"sample input 3","content":"4 4\n1 1\n2 2\n3 3\n1 4"},{"iden":"sample output 3","content":"Yes\n\nThe fourth information directly gives us the sum of all elements."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}