#include <bits/stdc++.h>   using namespace std;   const int N = 200005;   const long long INF = 1e9;   const long long MOD = 1000000007;   int prevs[20];   int main() {     ios ::sync_with_stdio(0);     cin.tie(0);     int n, q;     cin >> n >> q;     int arr[n];     for (int i = 0; i < n; i++) cin >> arr[i];     int ar[n][20];     for (int i = 0; i < n; i++)       for (int j = 0; j < 20; j++) ar[i][j] = n + 3;     for (int i = n - 1; i >= 0; i--) {       int x = 1;       for (int j = 0; j < 20; j++) {         if ((x << j) & arr[i]) {           ar[i][j] = i;           if (prevs[j] != 0)             for (int k = 0; k < 20; k++)               ar[i][k] = min(ar[i][k], ar[prevs[j]][k]);           prevs[j] = i;         }       }     }     while (q--) {       int x, y;       cin >> x >> y;       x--, y--;       if (!arr[x] || !arr[y]) {         cout <<  Fou  << endl;         continue;       }       int p = 1;       int l = 0;       for (int j = 0; j < 20; j++)         if (p << j & arr[y])           if (ar[x][j] <= y) {             l = 1;             continue;           }       if (l == 1)         cout <<  Shi  << endl;       else         cout <<  Fou  << endl;     }   }   