#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 1000000000000000007;
void AC_aaega() {
  string s;
  cin >> s;
  long long q;
  cin >> q;
  s = "@" + s + "@";
  vector<vector<long long> > right(((long long)s.size()),
                                   vector<long long>(26, 0));
  for (long long i = 1; i < ((long long)s.size()) - 1; i++) {
    right[i] = right[i - 1];
    right[i][s[i] - 'a']++;
  }
  while (q--) {
    long long l, r;
    cin >> l >> r;
    long long cnt = 0;
    for (long long i = 0; i < 26; i++) {
      if (right[r][i] - right[l - 1][i] > 0) {
        cnt++;
      }
    }
    if (r == l || s[l] != s[r] || cnt >= 3) {
      cout << "Yes\n";
      continue;
    } else {
      cout << "No\n";
      continue;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cerr.tie(0);
  long long testcases = 1;
  while (testcases--) {
    AC_aaega();
  }
  return 0;
}
