#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int cnt[maxn][26];
int main() {
  ios_base::sync_with_stdio(false);
  string str;
  cin >> str;
  for (int i = 0; i < str.length(); i++) {
    cnt[i + 1][str[i] - 'a']++;
  }
  for (int i = 1; i <= str.length(); i++) {
    for (int j = 0; j < 26; j++) {
      cnt[i][j] += cnt[i - 1][j];
    }
  }
  int Q;
  cin >> Q;
  for (int i = 1; i <= Q; i++) {
    int l, r;
    cin >> l >> r;
    l, r;
    if (r - l == 0) {
      cout << "Yes\n";
      continue;
    }
    int judge = 0;
    for (int i = 0; i < 26; i++) {
      if (cnt[r][i] - cnt[l - 1][i] > 0) judge++;
    }
    if (judge == 1) {
      puts("No");
      continue;
    } else if (judge == 2) {
      if (str[l - 1] == str[r - 1]) {
        puts("No");
        continue;
      }
    }
    if (str[l - 1] != str[r - 1] || judge >= 2)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
}
