#include <bits/stdc++.h>
using namespace std;
int n, m, par[200009], T, st[200009], ed[200009];
int anc[200009][20], level[200009];
vector<int> adj[200009];
void dfs(int s, int p, int l) {
  par[s] = p;
  st[s] = ++T;
  level[s] = l;
  for (auto u : adj[s]) {
    if (u != p) {
      dfs(u, s, l + 1);
    }
  }
  ed[s] = ++T;
}
void lca_init() {
  dfs(1, 1, 0);
  int i, j;
  for (j = 1; j < 20; j++) {
    for (i = 1; i <= n; i++) {
      anc[i][j] = 1;
    }
  }
  for (i = 1; i <= n; i++) anc[i][0] = par[i];
  for (j = 1; j < 20; j++) {
    for (i = 1; i <= n; i++) anc[i][j] = anc[anc[i][j - 1]][j - 1];
  }
}
int lca(int u, int v) {
  int i;
  if (level[u] < level[v]) swap(u, v);
  for (i = 19; i >= 0; i--) {
    if (level[anc[u][i]] >= level[v]) u = anc[u][i];
  }
  if (u == v) return u;
  for (i = 19; i >= 0; i--) {
    if (anc[u][i] != anc[v][i]) {
      u = anc[u][i];
      v = anc[v][i];
    }
  }
  return par[u];
}
int main() {
  int i, j, k, u, v;
  cin >> n >> m;
  for (i = 1; i < n; i++) {
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  lca_init();
  while (m--) {
    set<pair<int, int>> p;
    cin >> k;
    while (k--) {
      cin >> u;
      u = par[u];
      p.insert({level[u], u});
    }
    vector<int> vec;
    for (auto u : p) {
      vec.push_back(u.second);
    }
    int flag = 1;
    for (i = 0; i < vec.size() - 1; i++) {
      if (lca(vec[i], vec[i + 1]) != vec[i]) {
        cout << "NO" << endl;
        flag = 0;
        break;
      }
    }
    if (flag) cout << "YES" << endl;
  }
}
