#include <bits/stdc++.h>
using namespace std;
long long a[200000 + 1][27];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string x;
  cin >> x;
  long long n = x.size();
  for (long long i = 0; i <= 26; i++) {
    for (long long j = 0; j < n; j++) {
      if (x[j] == (i + 97)) {
        a[j + 1][i] = a[j][i] + 1;
      } else
        a[j + 1][i] = a[j][i];
    }
  }
  long long t;
  cin >> t;
  while (t--) {
    long long l, r;
    cin >> l >> r;
    vector<char> v;
    long long L = 0;
    for (long long i = 0; i < 26; i++) {
      if ((a[r][i] - a[l - 1][i])) {
        L += (a[r][i] - a[l - 1][i]);
        v.push_back(i + 97);
      }
    }
    if ((x[l - 1] != x[r - 1]) || (L == 1) || (v.size() >= 3)) {
      cout << "Yes"
           << "\n";
      continue;
    }
    cout << "No"
         << "\n";
  }
}
