#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long int t, l, r, m[200005][26];
string second;
int32_t main() {
  ios_base::sync_with_stdio();
  cin.tie();
  cout.tie();
  ;
  cin >> second;
  cin >> t;
  for (long long int i = 0; i < second.size(); i++) {
    if (i != 0) {
      for (long long int j = 0; j <= 26; j++) {
        m[i][j] = m[i - 1][j];
      }
    }
    m[i][second[i] - 'a']++;
  }
  while (t--) {
    cin >> l >> r;
    if (l == r || second[l - 1] != second[r - 1]) {
      cout << "Yes" << '\n';
    } else {
      long long int s1 = 0;
      for (long long int i = 0; i < 26; i++) {
        if (l == 1) {
          if (m[r - 1][i] != 0) {
            s1++;
          }
        } else {
          if (m[r - 1][i] - m[l - 2][i] != 0) {
            s1++;
          }
        }
      }
      if (s1 >= 3) {
        cout << "Yes" << '\n';
      } else
        cout << "No" << '\n';
    }
  }
}
