#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2 * 1e5 + 10;
long long INF = 1e9 + 10;
long long MOD = 1e9 + 7;
string second;
int q, cnt[MAXN][26];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> second;
  for (int i = 1; i <= second.size(); i++) {
    for (int j = 0; j < 26; j++) cnt[i][j] = cnt[i - 1][j];
    cnt[i][second[i - 1] - 'a']++;
  }
  cin >> q;
  while (q--) {
    int l, r;
    cin >> l >> r;
    l--;
    r--;
    if (l == r)
      cout << "Yes\n";
    else if (second[l] != second[r])
      cout << "Yes\n";
    else {
      int cnt_dif = 0;
      for (int i = 0; i < 26; i++) {
        if (cnt[r + 1][i] > cnt[l][i]) cnt_dif++;
      }
      if (cnt_dif > 2)
        cout << "Yes\n";
      else
        cout << "No\n";
    }
  }
  return 0;
}
