#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  int n = s.size();
  int a[26][n];
  for (int i = 0; i < 26; i++) a[i][0] = 0;
  a[s[0] - 97][0] = 1;
  for (int j = 1; j < n; j++) {
    for (int i = 0; i < 26; i++) {
      if (i == s[j] - 97)
        a[i][j] = a[i][j - 1] + 1;
      else
        a[i][j] = a[i][j - 1];
    }
  }
  int q;
  cin >> q;
  while (q--) {
    int l, r;
    cin >> l >> r;
    l--;
    r--;
    if (l == r)
      cout << "Yes\n";
    else if (l == 0) {
      int count = 0;
      for (int i = 0; i < 26; i++) {
        if (a[i][r] > 0) count++;
      }
      if (count == 1)
        cout << "No\n";
      else if (count == 2) {
        if (s[l] == s[r])
          cout << "No\n";
        else
          cout << "Yes\n";
      } else {
        cout << "Yes\n";
      }
    } else {
      int count = 0;
      for (int i = 0; i < 26; i++) {
        if (a[i][r] - a[i][l - 1] > 0) count++;
      }
      if (count == 1)
        cout << "No\n";
      else if (count == 2) {
        if (s[l] == s[r])
          cout << "No\n";
        else
          cout << "Yes\n";
      } else {
        cout << "Yes\n";
      }
    }
  }
}
