#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int sum[maxn][26];
char s[maxn];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> (s + 1);
  int q;
  cin >> q;
  int n = strlen(s + 1);
  for (int i = (1); i <= (n); i++) {
    for (int j = 0; j < (26); j++) {
      sum[i][j] = sum[i - 1][j];
    }
    sum[i][s[i] - 'a']++;
  }
  while (q--) {
    int l, r;
    cin >> l >> r;
    if (l == r) {
      cout << "Yes\n";
      continue;
    }
    int cnt = 0;
    for (int i = 0; i < (26); i++) {
      if (sum[r][i] - sum[l - 1][i]) cnt++;
    }
    if (cnt == 1) {
      cout << "No\n";
    } else if (cnt == 2) {
      if (s[l] == s[r])
        cout << "No\n";
      else
        cout << "Yes\n";
    } else {
      cout << "Yes\n";
    }
  }
}
