#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, y = 1;
  char c = std::getchar();
  while (c < '0' || c > '9') {
    if (c == '-') y = 0;
    c = std::getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + (c ^ 48);
    c = std::getchar();
  }
  return y ? x : -x;
}
int n, m;
int fir[200006], nex[400006], to[400006], tot;
int p[200006], fa[200006], size[200006];
int dfn[200006], deep[200006], dfscnt;
inline void add(int a, int b) {
  to[++tot] = b;
  nex[tot] = fir[a];
  fir[a] = tot;
}
void dfs(int u, int fat) {
  fa[u] = fat;
  deep[u] = deep[fat] + 1;
  dfn[u] = ++dfscnt;
  size[u] = 1;
  for (register int i = fir[u]; i; i = nex[i])
    if (to[i] != fat) dfs(to[i], u), size[u] += size[to[i]];
}
inline int check(int a, int b) {
  if (dfn[b] < dfn[a]) return 0;
  if (dfn[b] >= dfn[a] + size[a]) return 0;
  return 1;
}
inline int cmp(int x, int y) { return deep[x] < deep[y]; }
int main() {
  n = read();
  m = read();
  for (register int a, b, i = 1; i < n; i++) {
    a = read();
    b = read();
    add(a, b);
    add(b, a);
  }
  register int k;
  dfs(1, 1);
  while (m--) {
    k = read();
    for (register int i = 1; i <= k; i++) p[i] = fa[read()];
    std::sort(p + 1, p + 1 + k, cmp);
    for (register int i = 2; i <= k; i++)
      if (!check(p[i - 1], p[i])) goto NO;
    std::puts("YES");
    continue;
  NO:;
    std::puts("NO");
  }
  return 0;
}
