#include <bits/stdc++.h>
using namespace std;
int N, Q, p[200000 + 1000], depth[200000 + 1000], antenato[20][200000 + 1000];
vector<int> Grafo[200000 + 1000];
void dfs(int nodo = 0, int padre = -1, int dep = 0) {
  p[nodo] = padre;
  depth[nodo] = dep;
  for (auto x : Grafo[nodo])
    if (x == padre)
      continue;
    else
      dfs(x, nodo, dep + 1);
}
bool compare_depth(int a, int b) { return depth[a] < depth[b]; }
int lca(int u, int v) {
  if (depth[u] < depth[v]) swap(u, v);
  for (int k = 20 - 1; k >= 0; k--) {
    if (depth[u] - depth[v] >= (1 << k)) u = antenato[k][u];
  }
  if (u == v) return u;
  for (int k = 20 - 1; k >= 0; k--) {
    if (antenato[k][u] != antenato[k][v]) {
      u = antenato[k][u];
      v = antenato[k][v];
    }
  }
  return antenato[0][u];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> N >> Q;
  for (int i = 0; i < N - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    Grafo[u].push_back(v);
    Grafo[v].push_back(u);
  }
  dfs();
  for (int i = 0; i < N; i++) antenato[0][i] = p[i];
  for (int k = 1; k < 20; k++) {
    for (int i = 0; i < N; i++) {
      if (antenato[k - 1][i] != -1)
        antenato[k][i] = antenato[k - 1][antenato[k - 1][i]];
    }
  }
  while (Q--) {
    int k;
    cin >> k;
    int a[k];
    for (int i = 0; i < k; i++) cin >> a[i], a[i]--;
    sort(a, a + k, compare_depth);
    bool res = true;
    int LCA = a[k - 1], LCA_new = a[k - 1];
    for (int i = k - 1; i >= 0; i--) {
      int LCA_new = lca(LCA, a[i]);
      res = false;
      if (depth[a[i]] - depth[LCA_new] <= 1) res = true;
      if (res == false) break;
      LCA = LCA_new;
    }
    if (res == true)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
