#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimization("O3")
#pragma GCC optimization("avx2")
#pragma GCC optimization("unroll-loops")
vector<int> its[30];
vector<int>::iterator it, it2;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string s;
  int n, l, r;
  pair<char, int> l1, l2, r1, r2;
  cin >> s;
  for (int x = 0; x < s.length(); x++) {
    its[s[x] - 'a'].push_back(x + 1);
  }
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> l >> r;
    if (l == r) {
      cout << "Yes\n";
      continue;
    }
    l1.second = l2.second = l - 1;
    r1.second = r2.second = r + 1;
    for (int x = 0; x < 26; x++) {
      it = lower_bound(its[x].begin(), its[x].end(), l);
      it2 = upper_bound(its[x].begin(), its[x].end(), r);
      if (it >= it2) continue;
      if (*it < r2.second) {
        if (s[r - 1] - 'a' != x) {
          if (*it <= r1.second) {
            r2 = r1;
            r1.first = 'a' + x;
            r1.second = *it;
          } else {
            r2.second = *it;
            r2.first = 'a' + x;
          }
        }
        if (it2 == its[x].begin()) continue;
        it2--;
        if (*it2 > l2.second && x != s[l - 1] - 'a') {
          if (*it2 >= l1.second) {
            l2 = l1;
            l1.first = 'a' + x;
            l1.second = *it2;
          } else {
            l2.second = *it2;
            l2.first = 'a' + x;
          }
        }
      } else {
        if (it2 == its[x].begin()) continue;
        it2--;
        if (*it2 > l2.second && x != s[l - 1] - 'a') {
          if (*it2 >= l1.second) {
            l2 = l1;
            l1.first = 'a' + x;
            l1.second = *it2;
          } else {
            l2.second = *it2;
            l2.first = 'a' + x;
          }
        }
      }
    }
    if (l1.first != r1.first && r1.second <= l1.second) {
      cout << "Yes\n";
    } else if (r2.second <= l1.second || r1.second <= l2.second) {
      cout << "Yes\n";
    } else
      cout << "No\n";
  }
  return 0;
}
