Rachel has $$$n$$$ bags of candy containing $$$1, 2, \ldots, n$$$ pieces of candy. However, since she tripped and fell down the stairs, her candy bags have now been randomly scattered across the floor. Being the organized person she is, Rachel decides to arrange the bags of candy in a line $$$a_1, a_2, \ldots, a_n$$$, such that the $$$i$$$-th bag of candy contains $$$a_i$$$ pieces of candy in it.
Rachel wants to answer the following query for each interval $$$[l, r]$$$: if she rearranges the candies bags with $$$a_l, a_{l + 1}, \dots, a_{r - 1}, a_r$$$ candies, can she have $$$l, l + 1, \ldots, r$$$ pieces of candy in each bag respectively for that section?
The first line will contain $$$n, q$$$ ($$$1\leq n, q\leq 2\cdot 10^5$$$) — the number of bags of candy Rachel has and the number of queries respectively. Then, for the next $$$q$$$ lines, each line will contain two integers, $$$l_j, r_j$$$ ($$$1\leq l_j\leq r_j\leq n$$$), which represent the interval $$$[l, r]$$$ that Alice wants to perform the query on.
It is guaranteed that the sum of $$$n + q$$$ over all test cases does not exceed $$$2\cdot 10^5$$$.
For each query, respond either "YES" or "NO" (case insensitive, without the quotes) on a new line.
5 31 3 2 5 41 32 51 4
YES YES NO
For each query, we check if the subsequence of candies from bag $$$l$$$ to $$$r$$$ can be rearranged to match the increasing sequence $$$[l+1, r]$$$.
| Name |
|---|


