#include <bits/stdc++.h>
using namespace std;
int tot, head[200043], nxt[400043], ver[400043];
int fa[200043][21];
int dep[200043];
int vi[200043];
void Add_edge(int u, int v) {
  ++tot;
  nxt[tot] = head[u];
  ver[tot] = v;
  head[u] = tot;
}
void Dfs(int u) {
  for (int i = head[u]; i; i = nxt[i]) {
    int v = ver[i];
    if (v != fa[u][0]) {
      fa[v][0] = u;
      dep[v] = dep[u] + 1;
      Dfs(v);
    }
  }
}
bool cmp(int u, int v) { return dep[u] < dep[v]; }
bool LCA(int u, int v) {
  int dif = dep[v] - dep[u];
  for (int i = 19; i >= 0; --i) {
    if (dif >> i & 1) {
      v = fa[v][i];
    }
  }
  if (u == v) {
    return true;
  } else {
    return false;
  }
}
int main(int argc, char const *argv[]) {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    --u;
    --v;
    Add_edge(u, v);
    Add_edge(v, u);
  }
  Dfs(0);
  for (int j = 1; j < 20; ++j) {
    for (int i = 0; i < n; ++i) {
      fa[i][j] = fa[fa[i][j - 1]][j - 1];
    }
  }
  while (m--) {
    int k;
    cin >> k;
    for (int i = 0; i < k; ++i) {
      cin >> vi[i];
      --vi[i];
      vi[i] = fa[vi[i]][0];
    }
    sort(vi, vi + k, cmp);
    bool mark = true;
    for (int i = 1; i < k; ++i) {
      if (!LCA(vi[i - 1], vi[i])) {
        mark = false;
        break;
      }
    }
    cout << (mark ? "YES" : "NO") << endl;
  }
  return 0;
}
