#include <bits/stdc++.h>
using namespace std;
char str[200100];
int n;
int q;
int C[200100][26];
bool possible(int l, int r) {
  int l2 = l - 1;
  if (l2 < 0) l2 = 200050;
  int distinct = 0;
  for (int i = 0; i < 26; i++) {
    distinct += (C[r][i] - C[l2][i]) > 0;
  }
  if (l == r) {
    return true;
  }
  if (distinct == 1) {
    return false;
  }
  if (distinct > 2) {
    return true;
  }
  return str[l] != str[r];
}
int main() {
  scanf("%s", str);
  n = strlen(str);
  for (int i = 0; i < n; i++) {
    C[i][str[i] - 'a'] = 1;
    if (i > 0)
      for (int j = 0; j < 26; j++) C[i][j] += C[i - 1][j];
  }
  scanf("%d", &q);
  int l, r;
  while (q--) {
    scanf("%d%d", &l, &r);
    if (possible(l - 1, r - 1))
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
