#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long gcd(long long a, long long b) {
  while (a && b) a > b ? a %= b : b %= a;
  return a + b;
}
int pre[200005][27];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0),
      cin.exceptions(cin.failbit);
  string s;
  cin >> s;
  int q;
  cin >> q;
  pre[0][s[0] - 'a'] = 1;
  for (int i = 1; i < s.length(); i++) {
    for (int j = 0; j < 26; j++) {
      pre[i][j] = pre[i - 1][j];
    }
    pre[i][s[i] - 'a']++;
  }
  while (q--) {
    int l, r;
    cin >> l >> r;
    --l;
    --r;
    int cnt = 0;
    for (int i = 0; i < 26; i++) {
      if (l == 0) {
        cnt += pre[r][i] > 0;
      } else {
        cnt += (pre[r][i] - pre[l - 1][i]) > 0;
      }
    }
    if ((l == r) || s[l] != s[r] || cnt >= 3) {
      cout << "Yes" << '\n';
    } else {
      cout << "No" << '\n';
    }
  }
  return 0;
}
