#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const string& s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  return res;
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ")";
}
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
void debug_out(istream_iterator<string> it) {}
template <typename T, typename... Args>
void debug_out(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << to_string(a) << endl;
  debug_out(++it, args...);
}
using ll = long long int;
using ull = unsigned long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vii = vector<pii>;
using vll = vector<pll>;
const ld pi = acosl(-1);
const int inf = 1e9 + 7;
const ll INF = 1e18;
template <typename T>
inline bool powerof2(T a) {
  return (a && (!(a & (a - 1))));
}
template <typename T>
inline T log_2(T a) {
  T res = -1;
  while (a) {
    a /= 2;
    res++;
  }
  return res;
}
void solve() {
  string s;
  cin >> s;
  vector<vi> pre(s.length() + 1, vi(26, 0));
  for (int i = (int)(1); i <= (int)(s.length()); i++) {
    for (int j = 0; j < (int)(26); j++) {
      pre[i][j] = pre[i - 1][j];
    }
    pre[i][s[i - 1] - 'a']++;
  }
  int q, l, r;
  cin >> q;
  while (q--) {
    cin >> l >> r;
    if (l == r) {
      cout << "Yes" << '\n';
      continue;
    }
    int unique = 0;
    for (int i = 0; i < (int)(26); i++) {
      if ((pre[r][i] - pre[l - 1][i]) > 0) unique++;
    }
    if (unique > 2 || s[l - 1] != s[r - 1]) {
      cout << "Yes" << '\n';
      continue;
    }
    cout << "No" << '\n';
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << fixed << setprecision(10);
  solve();
  return 0;
}
