#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int mod = 998244353;
const int maxn = 2e5 + 10;
int tong[maxn][30];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s1;
  cin >> s1;
  int siz1 = s1.size();
  tong[0][s1[0] - 'a']++;
  for (int i = 1; i < siz1; i++) {
    for (int j = 0; j < 26; j++) {
      if (s1[i] - 'a' == j) {
        tong[i][j] = tong[i - 1][j] + 1;
      } else
        tong[i][j] = tong[i - 1][j];
    }
  }
  int n;
  cin >> n;
  for (int t1 = 1; t1 <= n; t1++) {
    int l, r;
    cin >> l >> r;
    l--;
    r--;
    int len = r - l + 1;
    if (len == 1) {
      cout << "Yes" << endl;
    } else if (len == 2) {
      if (s1[l] == s1[r])
        cout << "No" << endl;
      else
        cout << "Yes" << endl;
    } else {
      int temp[30];
      int kind = 0;
      for (int i = 0; i < 26; i++) {
        if (l == 0) {
          temp[i] = tong[r][i];
        } else
          temp[i] = tong[r][i] - tong[l - 1][i];
        if (temp[i] > 0) kind++;
      }
      if (kind >= 3) {
        cout << "Yes" << endl;
      } else if (kind == 1) {
        cout << "No" << endl;
      } else {
        if (s1[l] != s1[r])
          cout << "Yes" << endl;
        else
          cout << "No" << endl;
      }
    }
  }
  return 0;
}
