#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300005;
const int MAXM = 200005;
const int MOD = 1000000007;
const int MAMOD = 998244353;
const int INF = 0x3f3f3f3f;
const long long LLINF = 0x3f3f3f3f3f3f3f3f;
string s;
int sum[MAXN][27];
int main() {
  ios::sync_with_stdio(0);
  int q, l, r, cnt, len;
  cin >> s >> q;
  len = s.length();
  for (int i = 1; i <= len; ++i) {
    for (int j = 0; j < 26; ++j) sum[i][j] = sum[i - 1][j];
    sum[i][s[i - 1] - 'a']++;
  }
  while (q--) {
    cin >> l >> r;
    cnt = 0;
    if (l == r) {
      cout << "Yes\n";
      continue;
    }
    for (int i = 0; i < 26; ++i)
      if (sum[r][i] - sum[l - 1][i] > 0) cnt++;
    if (cnt > 2)
      cout << "Yes\n";
    else if (cnt == 2) {
      if (s[l - 1] == s[r - 1])
        cout << "No\n";
      else
        cout << "Yes\n";
    } else
      cout << "No\n";
  }
  return 0;
}
