Monocarp is playing a computer game. He starts the game being level $$$1$$$. He is about to fight $$$n$$$ monsters, in order from $$$1$$$ to $$$n$$$. The level of the $$$i$$$-th monster is $$$a_i$$$.
For each monster in the given order, Monocarp's encounter goes as follows:
After every $$$k$$$-th fight with a monster (fleeing monsters do not count), Monocarp's level increases by $$$1$$$. So, his level becomes $$$2$$$ after $$$k$$$ monsters he fights, $$$3$$$ after $$$2k$$$ monsters, $$$4$$$ after $$$3k$$$ monsters, and so on.
You need to process $$$q$$$ queries of the following form:
The first line contains two integers $$$n$$$ and $$$q$$$ ($$$1 \le n, q \le 2 \cdot 10^5$$$) — the number of monsters and the number of queries.
The second line contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 2 \cdot 10^5$$$) — the levels of the monsters.
In the $$$j$$$-th of the following $$$q$$$ lines, two integers $$$i$$$ and $$$x$$$ ($$$1 \le i, x \le n$$$) — the index of the monster and the number of fights required for a level up in the $$$j$$$-th query.
For each query, output "YES", if Monocarp will fight the $$$i$$$-th monster in this query, and "NO", if the $$$i$$$-th monster flees.
4 162 1 2 11 12 13 14 11 22 23 24 21 32 33 34 31 42 43 44 4
YES NO YES NO YES YES YES NO YES YES YES NO YES YES YES YES
7 151 1 2 1 1 1 15 32 22 21 65 15 57 73 57 44 32 51 25 64 16 1
NO YES YES YES NO YES YES YES NO NO YES YES YES NO NO
Name |
---|