{"raw_statement":[{"iden":"problem statement","content":"Two segments $[L_1:R_1]$ and $[L_2:R_2]$ are said to _intersect_ when $L_1 \\leq R_2$ and $L_2 \\leq R_1$ holds.\nConsider the following problem $P$:\n\nInput: $N$ segments $[L_1: R_1], \\cdots, [L_N:R_N]$\n       $L_1, L_2, \\cdots, L_N, R_1, R_2, \\cdots, R_N$ are pairwise distinct.\nOutput: the maximum number of segments that can be chosen so that no two of them intersect.\n\nTakahashi has implemented a program that works as follows:\n\nSort the given segments in the increasing order of $R_i$ and let the result be $[L_{p_1}:R_{p_1}], [L_{p_2}:R_{p_2}], \\cdots , [L_{p_N}:R_{p_N}]$.\nFor each $i = 1, 2, \\cdots , N$, do the following:\n  Choose $[L_{p_i}:R_{p_i}]$ if it intersects with none of the segments chosen so far.\nPrint the number of chosen segments.\n\nAoki, on the other hand, has implemented a program that works as follows:\n\nSort the given segments in the increasing order of $L_i$ and let the result be $[L_{p_1}:R_{p_1}], [L_{p_2}:R_{p_2}], \\cdots , [L_{p_N}:R_{p_N}]$.\nFor each $i = 1, 2, \\cdots , N$, do the following:\n  Choose $[L_{p_i}:R_{p_i}]$ if it intersects with none of the segments chosen so far.\nPrint the number of chosen segments.\n\nGiven are integers $N$ and $M$. Construct an input for the problem $P$, consisting of $N$ segments, such that the following holds:\n$$ (\\\\text{The value printed by Takahashi's program}) - (\\\\text{The value printed by Aoki's program}) = M $$"},{"iden":"constraints","content":"*   All values in input are integers.\n*   $1 \\leq N \\leq 2 \\times 10^5$\n*   $-N \\leq M \\leq N$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $M$"},{"iden":"sample input 1","content":"5 1"},{"iden":"sample output 1","content":"1 10\n8 12\n13 20\n11 14\n2 4\n\nLet us call the five segments Segment $1$, Segment $2$, $\\cdots$, Segment $5$.\nTakahashi's program will work as follows:\n\nRearrange the segments into the order Segment $5$, Segment $1$, Segment $2$, Segment $4$, Segment $3$.\nChoose Segment $5$.\nSkip Segment $1$ (because it intersects with Segment $5$).\nChoose Segment $2$.\nSkip Segment $4$ (because it intersects with Segment $2$).\nChoose Segment $3$.\n\nThus, Takahashi's program will print $3$.\nAoki's program will work as follows:\n\nRearrange the segments into the order Segment $1$, Segment $5$, Segment $2$, Segment $4$, Segment $3$.\nChoose Segment $1$.\nSkip Segment $5$ (because it intersects with Segment $1$).\nSkip Segment $2$ (because it intersects with Segment $1$).\nChoose Segment $4$.\nSkip Segment $3$ (because it intersects with Segment $4$).\n\nThus, Aoki's program will print $2$.\nHere, we have $3 - 2 = 1 \\left(= M \\right)$, and thus these five segments satisfy the condition."},{"iden":"sample input 2","content":"10 -10"},{"iden":"sample output 2","content":"\\-1"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}