#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int n, T, l, r, c;
int cnt[27][N], a[N];
char s[N];
void init() {
  int i, j;
  n = strlen(s + 1);
  for (i = 1; i <= n; i++) a[i] = s[i] - 'a' + 1;
  for (i = 1; i <= 26; i++)
    for (j = 1; j <= n; j++) cnt[i][j] = cnt[i][j - 1] + (a[j] == i);
}
int main() {
  int i;
  scanf("%s", s + 1);
  init();
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d", &l, &r);
    c = 0;
    if (l == r) {
      printf("Yes\n");
      continue;
    }
    if (s[l] != s[r]) {
      printf("Yes\n");
      continue;
    }
    for (i = 1; i <= 26; i++)
      if (cnt[i][r] - cnt[i][l - 1]) c++;
    if (c <= 2)
      printf("No\n");
    else
      printf("Yes\n");
  }
  return 0;
}
