#P1168C. And Reachability

And Reachability

Description

Toad Pimple has an array of integers a1,a2,,ana_1, a_2, \ldots, a_n.

We say that yy is reachable from xx if x<yx<y and there exists an integer array pp such that x=p1<p2<<pk=yx = p_1 < p_2 < \ldots < p_k=y, and api&api+1>0a_{p_i}\, \&\, a_{p_{i+1}} > 0 for all integers ii such that 1i<k1 \leq i < k.

Here &\& denotes the bitwise AND operation.

You are given qq pairs of indices, check reachability for each of them.

The first line contains two integers nn and qq (2n3000002 \leq n \leq 300\,000, 1q3000001 \leq q \leq 300\,000) — the number of integers in the array and the number of queries you need to answer.

The second line contains nn space-separated integers a1,a2,,ana_1, a_2, \ldots, a_n (0ai3000000 \leq a_i \leq 300\,000) — the given array.

The next qq lines contain two integers each. The ii-th of them contains two space-separated integers xix_i and yiy_i (1xi<yin1 \leq x_i < y_i \leq n). You need to check if yiy_i is reachable from xix_i.

Output qq lines. In the ii-th of them print "Shi" if yiy_i is reachable from xix_i, otherwise, print "Fou".

Input

The first line contains two integers nn and qq (2n3000002 \leq n \leq 300\,000, 1q3000001 \leq q \leq 300\,000) — the number of integers in the array and the number of queries you need to answer.

The second line contains nn space-separated integers a1,a2,,ana_1, a_2, \ldots, a_n (0ai3000000 \leq a_i \leq 300\,000) — the given array.

The next qq lines contain two integers each. The ii-th of them contains two space-separated integers xix_i and yiy_i (1xi<yin1 \leq x_i < y_i \leq n). You need to check if yiy_i is reachable from xix_i.

Output

Output qq lines. In the ii-th of them print "Shi" if yiy_i is reachable from xix_i, otherwise, print "Fou".

Sample Input 1

5 3
1 3 0 2 1
1 3
2 4
1 4

Sample Output 1

Fou
Shi
Shi

Note

In the first example, a3=0a_3 = 0. You can't reach it, because AND with it is always zero. a2&a4>0a_2\, \&\, a_4 > 0, so 44 is reachable from 22, and to go from 11 to 44 you can use p=[1,2,4]p = [1, 2, 4].