Let's call an array of integers [b_1, b_2, \ldots, b_m] good, if we can partition all of its elements into non-empty groups, such that the bitwise AND of the elements in the first group is equal to the bitwise OR of the elements in the second group. For example, the array [1, 7, 3, 11] is good, as we can partition it into and , where OR 3 = 3, and AND 11=3.
You are given an array [a_1, a_2, \ldots, a_n], and have to answer queries of form: is subarray [a_l, a_{l+1}, \ldots, a_r] good?
The first line of the input contains two integer , (1 \le n \le 10^5, 1 \le q \le 10^5) — the length of the array and the number of the associated queries.
The second line of the input contains integers a_1, a_2, \ldots, a_n (0 \le a_i \le 2^{30} - 1) — the elements of the array.
The -th of the next lines contains integers l_i, r_i (1 \le l_i \le r_i \le n) — describing the -th query.
For each query, output YES, if the correspondent subarray is good, and NO, if it's not.
Example 1