#include <bits/stdc++.h>
using namespace std;
void OUT_TST(string s, istream_iterator<string> it) { cerr << s; }
template <typename T, typename... Args>
void OUT_TST(string s, istream_iterator<string> it, T a, Args... args) {
  cerr << *it << "=" << a << " ";
  OUT_TST(s, ++it, args...);
}
template <class T>
void rd(T& ret) {
  ret = 0;
  bool ok = 0, u = 0;
  for (;;) {
    int c = getchar();
    if (c >= '0' && c <= '9')
      ret = (ret << 3) + (ret << 1) + c - '0', ok = 1;
    else if (c == '-')
      u = 1;
    else if (ok) {
      if (u) ret *= -1;
      return;
    }
  }
}
long long powmod(long long p, long long n, long long mod) {
  long long ret = 1;
  for (; n; n >>= 1) {
    if (n & 1) ret = ret * p % mod;
    p = p * p % mod;
  }
  return ret;
}
template <class T>
bool chmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool chmax(T& a, const T& b) {
  return b > a ? a = b, 1 : 0;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
const int N = 2e5 + 9;
int cnt[N][26];
char s[N];
int count(int l, int r) {
  int ret = 0;
  for (int i = 0; i < 26; i++) {
    if (cnt[r + 1][i] - cnt[l][i] > 0) ++ret;
  }
  return ret;
}
int main() {
  scanf("%s", s);
  int n = strlen(s);
  memset(cnt, 0, sizeof cnt);
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < 26; ++j) cnt[i][j] = cnt[i - 1][j];
    cnt[i][s[i - 1] - 'a']++;
  }
  int q;
  scanf("%d", &q);
  while (q--) {
    int l, r;
    scanf("%d%d", &l, &r);
    --l;
    --r;
    bool ans;
    if (l == r)
      ans = true;
    else if (s[l] != s[r])
      ans = true;
    else {
      if (count(l, r) >= 3)
        ans = true;
      else
        ans = false;
    }
    puts(ans ? "Yes" : "No");
  }
  return 0;
}
