P11055 Yet another ZP problem
Description
There are $n$ points arranged from left to right, numbered $1,2,\dots,n$.
You need to add some edges between them, and denote the edge set as $E=\{(x,y)\ |\ 1\leq x
Input Format
The first line contains two integers $n,m$.
The next $m$ lines each contain two positive integers $l_i,r_i$.
Output Format
The first line output one number representing $|E|$.
The next $|E|$ lines each contain two numbers $x,y$ representing an edge. **Note that you must ensure $1\le x
Explanation/Hint
### Sample Explanation
For the constraint $[1, 1]$, there is an edge $(1, 4)$ such that $[1 \in [1, 1]] + [4 \in [1, 1]] = 1$.
For the constraint $[3, 4]$, there is an edge $(1, 4)$ such that $[1 \in [3, 4]] + [4 \in [3, 4]] = 1$.
For the constraint $[2, 2]$, there is an edge $(2, 3)$ such that $[2 \in [2, 2]] + [3 \in [2, 2]] = 1$.
### Constraints
For all testdata, it is guaranteed that $3\leq n\leq 10^4$, $0\leq m\leq 10^5$, $1\le l_i