#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const long long BIG = 1446803456761533460;
const int Big = 336860180;
stringstream sss;
const int maxn = 200010;
const int maxnlg = 20;
const int E = 26;
int n, Q;
string s;
int ps[E][maxn];
void MAIN() {
  cin >> s >> Q;
  n = s.size();
  for (int i = (0); i < (n); ++i) {
    for (int j = (0); j < (E); ++j) {
      ps[j][i + 1] = ps[j][i] + (s[i] - 'a' == j);
    }
  }
  for (int q = (0); q < (Q); ++q) {
    int l, r;
    cin >> l >> r;
    --l;
    int c = 0;
    for (int i = (0); i < (E); ++i) {
      if (ps[i][r] - ps[i][l] > 0) ++c;
    }
    if (c > 2 || r - l == 1)
      cout << "Yes";
    else if (c == 1)
      cout << "No";
    else if (s[l] == s[r - 1])
      cout << "No";
    else
      cout << "Yes";
    cout << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cout << fixed << setprecision(10);
  sss << R"(
    )";
  MAIN();
  return 0;
}
