#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
mt19937 gen(228);
vector<int> pos[26];
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  string s;
  cin >> s;
  int q;
  cin >> q;
  for (int i = 0; i < s.size(); i++) {
    pos[s[i] - 'a'].push_back(i);
  }
  while (q--) {
    int l, r;
    cin >> l >> r;
    l--;
    if (r - l == 1) {
      cout << "Yes\n";
      continue;
    }
    if (s[l] != s[r - 1]) {
      cout << "Yes\n";
      continue;
    }
    int cnt = 0;
    for (int i = 0; i < 26; i++) {
      auto itl = lower_bound((pos[i]).begin(), (pos[i]).end(), l);
      if (itl == pos[i].end() || *itl >= r) continue;
      cnt++;
    }
    if (cnt >= 3) {
      cout << "Yes\n";
    } else {
      cout << "No\n";
    }
  }
  return 0;
}
