#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    string str;
    cin >> str;
    int q;
    cin >> q;
    int n = str.length();
    int pre[n + 5][30];
    str = '%' + str;
    memset(pre, 0, sizeof pre);
    for (int i = 1; i <= n; i++) {
      for (int j = 0; j < 26; j++) {
        pre[i][j] = pre[i - 1][j];
      }
      pre[i][str[i] - 'a']++;
    }
    while (q--) {
      int l, r;
      cin >> l >> r;
      int cnt = 0;
      for (int i = 0; i < 26; i++) {
        if (pre[r][i] - pre[l - 1][i] > 0) cnt++;
      }
      if (l == r || cnt > 2 || str[l] != str[r])
        cout << "Yes\n";
      else
        cout << "No\n";
    }
  }
}
