For an array $$$a$$$, define $$$f(a)$$$ as follows:
You are given an array $$$a$$$ of length $$$n$$$. Answer $$$q$$$ queries in the following form:
The first line of each test contains two integers $$$n$$$ and $$$q$$$ ($$$2 \le n \le 10^5$$$, $$$1 \le q \le 10^6$$$) — the length of $$$a$$$ and the number of queries, respectively.
The second line contains $$$n$$$ integers $$$a_1,a_2,\ldots,a_n$$$ ($$$0 \le a_i \lt 2^{30}$$$) — the elements of $$$a$$$.
Each of the next $$$q$$$ lines contains two integers $$$l$$$ and $$$r$$$ ($$$1 \le l \le r \le n$$$), describing a query.
For each query, output $$$f([a_l,a_{l+1},\ldots,a_r])$$$.
6 35 4 2 1 1 81 31 62 5
11 20 8