After successfully forming groups once Johny English became famous for group formation. Now the Prime Minister wants to test if Johny English is actually good at group formation or if it was just a lucky shot. There are $$$n$$$ people standing in a line. The person at $$$i^{th}$$$ belongs to the country $$$c_i$$$. The Prime Minister asked Johny English to divide these people into groups following these conditions:
The first line of the Input contains two integers $$$n$$$ $$$(1\le n \le 10^6)$$$ and $$$q$$$ $$$(1\le q \le 10^5)$$$ denoting the number of people. The next line contains $$$n$$$ integers denoting $$$c_i$$$ $$$(1 \le c_i \le 10^5)$$$. $$$i^{th}$$$ of the next $$$q$$$ lines contains two integers $$$l_i$$$ and $$$r_i$$$ $$$1 \le l_i \le r_i \le n$$$.
For each query print one integer in a single line denoting the answer to the query.
6 9 2 3 3 1 1 1 3 5 4 5 1 5 1 1 1 6 3 5 3 4 3 3 1 6
4 4 4 4 3 4 3 4 3