#include <bits/stdc++.h>
long long rd() {
  long long data = 0, w = 1;
  char ch = 0;
  while (ch != '-' && (ch > '9' || ch < '0')) ch = getchar();
  (ch == '-') && (w = -1, ch = getchar());
  while (ch >= '0' && ch <= '9') {
    data = data * 10 + ch - '0';
    ch = getchar();
  }
  return data * w;
}
void P(long long v) {
  if (v < 0) {
    putchar('-');
    v = -v;
  }
  if (v > 9) P(v / 10);
  putchar(v % 10 + '0');
}
struct E {
  long long v, n;
  E(long long a = 0, long long b = 0) : v(a), n(b) {}
} e[400010];
long long n, h[400010], c, dt, q, u, v, K, fl;
long long dfn[400010], dep[400010], F[400010], sz[400010], x[400010];
void ad(long long u, long long v) {
  e[++c] = E(v, h[u]);
  h[u] = c;
}
void df(long long u, long long f) {
  F[u] = f;
  dep[u] = dep[f] + 1;
  dfn[u] = ++dt;
  sz[u] = 1;
  for (long long i = h[u]; i; i = e[i].n) {
    long long v = e[i].v;
    if (v == f) continue;
    df(v, u);
    sz[u] += sz[v];
  }
}
signed main() {
  n = rd();
  q = rd();
  for (long long i = (2); i <= (n); i++) {
    u = rd();
    v = rd();
    ad(u, v);
    ad(v, u);
  }
  df(1, 0);
  F[1] = 1;
  for (long long i = (1); i <= (q); i++) {
    K = rd();
    for (long long k = (1); k <= (K); k++) x[k] = F[rd()];
    std::sort(x + 1, x + K + 1,
              [](long long a, long long b) -> bool { return dep[a] < dep[b]; });
    fl = 0;
    for (long long k = (1); k <= (K - 1); k++) {
      if (x[k] == x[k + 1]) continue;
      if (dfn[x[k]] < dfn[x[k + 1]] && dfn[x[k + 1]] < dfn[x[k]] + sz[x[k]] - 1)
        ;
      else {
        fl = 1;
        break;
      }
    }
    puts(!fl ? "YES" : "NO");
  }
}
