#include <bits/stdc++.h>
using namespace std;
int n, m, T = 0;
vector<bool> visited(200001, 0);
vector<vector<int> > adj(200001);
vector<pair<int, int> > t(200001);
vector<int> depth(200001, 0);
vector<int> parent(200001);
void dfs(int v) {
  visited[v] = true;
  t[v].first = T++;
  for (int i = 0; i < adj[v].size(); ++i) {
    if (!visited[adj[v][i]]) {
      depth[adj[v][i]] = depth[v] + 1;
      parent[adj[v][i]] = v;
      dfs(adj[v][i]);
    }
  }
  t[v].second = T++;
}
int main() {
  cin >> n >> m;
  vector<vector<int> > q(m);
  vector<int> maxm(m, 1);
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs(1);
  for (int i = 0; i < m; ++i) {
    int k;
    cin >> k;
    for (int j = 0; j < k; ++j) {
      int x;
      cin >> x;
      if (x != 1) x = parent[x];
      if (depth[x] > depth[maxm[i]]) maxm[i] = x;
      q[i].push_back(x);
    }
  }
  for (int i = 0; i < m; ++i) {
    bool flag = 1;
    for (int j = 0; j < q[i].size(); ++j) {
      if (!(t[maxm[i]].first >= t[q[i][j]].first &&
            t[maxm[i]].second <= t[q[i][j]].second)) {
        flag = 0;
        break;
      }
    }
    if (flag)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
}
