#include <bits/stdc++.h>
using namespace std;
vector<int> graph[200001];
int depth[200001];
int parent[200001][18];
void dfs(int cur, int prev) {
  depth[cur] = depth[prev] + 1;
  parent[cur][0] = prev;
  for (int i = 0; i < graph[cur].size(); i++) {
    if (graph[cur][i] != prev) dfs(graph[cur][i], cur);
  }
}
void precomputeSparseMatrix(int n) {
  for (int i = 1; i < 18; i++) {
    for (int node = 1; node <= n; node++) {
      if (parent[node][i - 1] != -1)
        parent[node][i] = parent[parent[node][i - 1]][i - 1];
    }
  }
}
int lca(int u, int v) {
  if (depth[v] < depth[u]) swap(u, v);
  int diff = depth[v] - depth[u];
  for (int i = 0; i < 18; i++)
    if ((diff >> i) & 1) v = parent[v][i];
  if (u == v) return u;
  for (int i = 18 - 1; i >= 0; i--)
    if (parent[u][i] != parent[v][i]) {
      u = parent[u][i];
      v = parent[v][i];
    }
  return parent[u][0];
}
int main() {
  long long int n, q;
  cin >> n >> q;
  for (long long int i = 0; i < n - 1; i++) {
    long long int u, v;
    cin >> u >> v;
    graph[u].push_back(v);
    graph[v].push_back(u);
  }
  dfs(1, 0);
  precomputeSparseMatrix(n);
  while (q--) {
    long long int k;
    cin >> k;
    vector<long long int> v(k);
    for (long long int i = 0; i < k; i++) {
      cin >> v[i];
    }
    long long int node = -1, d = -1;
    for (long long int i = 0; i < k; i++) {
      if (depth[v[i]] > d) {
        node = v[i];
        d = depth[v[i]];
      }
    }
    long long int ok = 1;
    for (long long int i = 0; i < k; i++) {
      long long int l = lca(node, v[i]);
      if (abs(depth[l] - depth[v[i]]) > 1) {
        ok = 0;
        break;
      }
    }
    if (ok) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
