#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
using namespace std;
vector<vector<int> > child;
vector<vector<int> > par;
vector<int> rootdist;
void dfs(int cur, vector<bool> &vis, int d) {
  int curc;
  for (int i = 0; i < child[cur].size(); i++) {
    curc = child[cur][i];
    if (!vis[curc]) {
      vis[curc] = 1;
      int tcur = cur;
      for (int j = 0; j < 20; j++) {
        par[curc][j] = tcur;
        tcur = par[tcur][j];
      }
      rootdist[curc] = d;
      dfs(curc, vis, d + 1);
    }
  }
}
bool lca(int p, int c) {
  if ((p == 0 || p == 1) || (p == c || p == par[c][0])) return 1;
  int d = rootdist[c] - rootdist[p];
  if (d < 2) return 0;
  int t = 1, i = 0;
  while (t <= d) {
    t *= 2;
    i++;
  }
  i--;
  return lca(p, par[c][i]);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  child.resize(n + 1);
  vector<int> tempp(20);
  par.resize(n + 1, tempp);
  rootdist.resize(n + 1);
  int u, v;
  for (int i = 0; i < n - 1; i++) {
    cin >> u >> v;
    child[u].push_back(v);
    child[v].push_back(u);
  }
  vector<bool> vis(n + 1);
  vis[1] = 1;
  par[0][0] = -1;
  rootdist[0] = -1;
  dfs(1, vis, 1);
  int k;
  for (int i = 0; i < m; i++) {
    cin >> k;
    vector<int> temp(2);
    vector<vector<int> > arr(k, temp);
    for (int j = 0; j < k; j++) {
      cin >> arr[j][1];
      arr[j][1] = par[arr[j][1]][0];
      arr[j][0] = rootdist[arr[j][1]];
    }
    if (k == 1) {
      cout << "YES" << endl;
      continue;
    }
    sort(arr.begin(), arr.end());
    bool f = 1;
    for (int j = k - 2; j >= 0; j--) {
      if (!lca(arr[j][1], arr[j + 1][1])) {
        f = 0;
        break;
      }
    }
    if (f)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
