#include <bits/stdc++.h>
using namespace std;
const long long int mxn = 2e5 + 3;
long long int n;
long long int tym[mxn][2];
long long int T = 0;
vector<long long int> adj[mxn];
vector<long long int> deep;
vector<long long int> p;
void dfs(long long int u, long long int par = -1) {
  tym[u][0] = T++;
  p[u] = par;
  for (long long int to : adj[u]) {
    if (to == par) continue;
    dfs(to, u);
  }
  tym[u][1] = T++;
}
void d(long long int u, long long int depth = 0, long long int par = -1) {
  deep[u] = depth;
  for (long long int to : adj[u]) {
    if (to == par) continue;
    d(to, depth + 1, u);
  }
}
bool isAncestor(long long int v, long long int u) {
  return tym[v][0] <= tym[u][0] and tym[v][1] >= tym[u][0];
}
void tc() {
  T = 0;
  cin >> n;
  deep.assign(n + 1, 0);
  p.assign(n + 1, -1);
  long long int m;
  cin >> m;
  for (long long int i = 0; i < n + 1; i++) adj[i].clear();
  long long int u, v;
  for (long long int i = 1; i < n; i++) {
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs(1);
  d(1);
  long long int node;
  long long int k;
  while (m--) {
    cin >> k;
    vector<long long int> q(k);
    for (long long int i = 0; i < k; i++) cin >> q[i];
    node = q[0];
    for (long long int el : q)
      if (deep[el] > deep[node]) node = el;
    for (long long int i = 0; i < k; i++) {
      if (q[i] == node) continue;
      if (p[q[i]] != -1) q[i] = p[q[i]];
    }
    bool ok = true;
    for (long long int el : q) ok &= isAncestor(el, node);
    ok ? cout << "YES" : cout << "NO";
    cout << "\n";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  t = 1;
  while (t--) tc();
}
