#include <bits/stdc++.h>
using namespace std;
vector<int> g[200005];
bool vis[200005];
int deg[200005];
int par[200005][20], n;
void dfs(int v, int d) {
  int i, j;
  vis[v] = 1;
  deg[v] = d;
  for (i = 0; i < g[v].size(); i++) {
    if (!vis[g[v][i]]) {
      par[g[v][i]][0] = v;
      dfs(g[v][i], d + 1);
    }
  }
}
void makelca() {
  int i, j;
  par[1][0] = -1;
  for (i = 1; i < 20; i++) {
    for (j = 1; j <= n; j++) {
      par[j][i] = (par[j][i - 1] == -1 ? -1 : par[par[j][i - 1]][i - 1]);
    }
  }
}
bool lca(int u, int v) {
  if (deg[u] > deg[v]) swap(u, v);
  int i;
  for (i = 19; i >= 0; i--) {
    if ((deg[v] - deg[u]) >= (1 << i)) {
      v = par[v][i];
    }
  }
  if (u == v || par[u][0] == par[v][0]) {
    return true;
  }
  return false;
}
priority_queue<pair<int, int> > qu;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int m, i, j, u, v, x;
  cin >> n >> m;
  for (i = 1; i < n; i++) {
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(1, 1);
  int q;
  makelca();
  for (i = 1; i <= m; i++) {
    cin >> q;
    for (j = 1; j <= q; j++) {
      cin >> u;
      qu.push({-deg[u], u});
    }
    bool fl = true;
    while (!qu.empty()) {
      u = qu.top().second;
      qu.pop();
      if (qu.empty()) break;
      v = qu.top().second;
      x = lca(u, v);
      if (!x) {
        fl = false;
      }
    }
    if (fl) {
      cout << "YES" << endl;
    } else
      cout << "NO" << endl;
  }
  return 0;
}
