#include <bits/stdc++.h>
using namespace std;
constexpr int N = 5e5 + 10;
int n, m, mytime, h[N], st[N], fi[N], sz[N], v, he, par, ver[N], cnt[N][30];
vector<int> node[N];
vector<pair<int, int>> q[N];
bool yes[N];
string s;
void sack(int v, int keep) {
  int mx = 0, who = 0;
  for (auto i : node[v])
    if (mx < sz[i]) {
      mx = sz[i];
      who = i;
    }
  for (auto i : node[v])
    if (i != who) sack(i, 0);
  if (who) sack(who, 1);
  cnt[h[v]][s[v - 1] - 'a']++;
  for (auto i : node[v])
    if (i != who)
      for (int j = st[i]; j < fi[i]; j++) cnt[h[ver[j]]][s[ver[j] - 1] - 'a']++;
  while (q[v].size()) {
    int odd = 0;
    for (int i = 0; i < 26; i++)
      if (cnt[(q[v].back()).first][i] & 1) odd++;
    if (odd <= 1) yes[(q[v].back()).second] = true;
    q[v].pop_back();
  }
  if (!keep)
    for (int i = st[v]; i < fi[v]; i++) cnt[h[ver[i]]][s[ver[i] - 1] - 'a']--;
}
void pre(int v) {
  ver[mytime] = v;
  st[v] = mytime++;
  for (auto i : node[v]) {
    h[i] = h[v] + 1;
    pre(i);
    sz[v] += sz[i];
  }
  sz[v]++;
  fi[v] = mytime;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 2; i <= n; i++) {
    cin >> par;
    node[par].push_back(i);
  }
  cin >> s;
  h[1] = 1;
  pre(1);
  for (int i = 0; i < m; i++) {
    cin >> v >> he;
    q[v].push_back({he, i});
  }
  sack(1, 1);
  for (int i = 0; i < m; i++) {
    if (yes[i])
      cout << "Yes" << '\n';
    else
      cout << "No" << '\n';
  }
  return 0;
}
