func_code_string: #include <bits/stdc++.h>   using namespace std;   const int iinf = 1 << 29;   const long long inf = 1ll << 60;   const long long mod = 1e9 + 7;   void GG() {     cout <<  -1 n ;     exit(0);   }   long long mpow(long long a, long long n, long long mo = mod) {     long long re = 1;     while (n > 0) {       if (n & 1) re = re * a % mo;       a = a * a % mo;       n >>= 1;     }     return re;   }   long long inv(long long b) {     return b == 1 ? 1 : (mod - mod / b) * inv(mod % b) % mod;   }   const int maxn = 2e5 + 5;   int p[maxn][26];   signed main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     ;     string second;     cin >> second;     int n = second.length();     for (int i = (0); i < (n); ++i) {       for (int j = (0); j < (26); ++j) p[i + 1][j] += p[i][j];       p[i + 1][second[i] -  a ]++;     }     int q;     cin >> q;     while (q--) {       int l, r;       cin >> l >> r;       --l;       --r;       if (l == r) {         cout <<  Yes  <<   n ;       } else {         if (second[l] != second[r]) {           cout <<  Yes  <<   n ;         } else {           int tp = 0;           for (int j = (0); j < (26); ++j) {             if (p[r + 1][j] - p[l][j] > 0) tp++;           };           if (tp > 2)             cout <<  Yes  <<   n ;           else             cout <<  No  <<   n ;         }       }     }   }   