#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long linf = 0x3f3f3f3f3f3f3f3f;
const int maxn = 5e5 + 11;
const int maxm = 2e3 + 11;
const int mod = 1000000007;
const double eps = 1e-4;
inline long long rd() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline long long qpow(long long a, long long b, long long p) {
  long long res = 1;
  while (b) {
    if (b & 1) {
      res *= a;
      res %= p;
    }
    b >>= 1;
    a = a * a % p;
  }
  return res;
}
inline long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int num[maxn][26], cnt[maxn], txt[maxn];
int head[maxn], nxt[maxn], tot, ver[maxn], sz[maxn], son[maxn], Son, dep[maxn];
string ans[maxn];
char s[maxn];
vector<pair<int, int> > v[maxn];
void add(int x, int y) {
  nxt[++tot] = head[x];
  head[x] = tot;
  ver[tot] = y;
}
void dfs1(int x, int fa) {
  sz[x] = 1;
  dep[x] = dep[fa] + 1;
  for (int i = head[x]; i; i = nxt[i]) {
    int y = ver[i];
    dfs1(y, x);
    if (sz[y] > sz[son[x]]) son[x] = y;
    sz[x] += sz[y];
  }
}
void change(int x, int val) {
  num[dep[x]][s[x] - 'a'] += val;
  if (num[dep[x]][s[x] - 'a'] & 1)
    txt[dep[x]] += val;
  else
    txt[dep[x]] -= val;
  cnt[dep[x]] += val;
  for (int i = head[x]; i; i = nxt[i]) {
    int y = ver[i];
    if (y == Son) continue;
    change(y, val);
  }
}
void del(int x, int val) {
  num[dep[x]][s[x] - 'a'] = 0;
  if (num[dep[x]][s[x] - 'a'] % 2 == 0)
    txt[dep[x]] = 0;
  else
    txt[dep[x]] = 0;
  cnt[dep[x]] = 0;
  for (int i = head[x]; i; i = nxt[i]) {
    int y = ver[i];
    if (y == Son) continue;
    del(y, val);
  }
}
void dfs2(int x, int flag) {
  for (int i = head[x]; i; i = nxt[i]) {
    int y = ver[i];
    if (y == son[x]) continue;
    dfs2(y, 1);
  }
  if (son[x]) {
    dfs2(son[x], 0);
    Son = son[x];
  }
  change(x, 1);
  Son = 0;
  for (int i = 0; i < v[x].size(); i++) {
    if (x == 1) {
      int tt;
      tt = 0;
    }
    int y = v[x][i].second;
    int o = v[x][i].first;
    if (cnt[y] % 2 && txt[y] > 1)
      ans[o] = "No";
    else if (cnt[y] % 2 == 0 && txt[y] > 0)
      ans[o] = "No";
    else
      ans[o] = "Yes";
  }
  if (flag) del(x, -1);
}
int main() {
  int n = rd(), q = rd();
  for (int i = 2; i <= n; i++) {
    add(rd(), i);
  }
  cin >> s + 1;
  for (int i = 1; i <= q; i++) {
    int x = rd(), y = rd();
    v[x].push_back(make_pair(i, y));
  }
  dep[0] = 0;
  dfs1(1, 0);
  dfs2(1, 0);
  for (int i = 1; i <= q; i++) {
    cout << ans[i] << "\n";
  }
}
