#include <bits/stdc++.h>
using namespace std;
int i, j, t, n, m, x, y, k, u;
vector<int> parent, d, v;
vector<int> tin, tout;
vector<vector<int>> g;
void dfs(int v, int par = -1, int dep = 0) {
  parent[v] = par;
  d[v] = dep;
  tin[v] = t++;
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (to == par) continue;
    dfs(to, v, dep + 1);
  }
  tout[v] = t++;
}
bool isAnc(int v, int u) { return tin[v] <= tin[u] && tout[u] <= tout[v]; }
int main() {
  scanf("%d %d", &n, &m);
  t = 1;
  parent.resize(n + 1);
  d.resize(n + 1);
  tin.resize(n + 1);
  tout.resize(n + 1);
  g.resize(n + 1);
  for (i = 0; i < n - 1; i++) {
    scanf("%d %d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  dfs(1);
  for (i = 0; i < m; i++) {
    scanf("%d", &k);
    v.resize(k);
    for (j = 0; j < k; j++) scanf("%d", &v[j]);
    u = v[0];
    for (j = 0; j < k; j++)
      if (d[u] < d[v[j]]) u = v[j];
    for (j = 0; j < k; j++)
      if (parent[v[j]] != -1) v[j] = parent[v[j]];
    bool ok = true;
    for (j = 0; j < k; j++) ok &= isAnc(v[j], u);
    if (ok)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
