#include <bits/stdc++.h>
using namespace std;
vector<int> parent, tin, tout, dd;
int T;
void dfs(int root, int p, vector<vector<int>>& v, int d) {
  dd[root] = d;
  parent[root] = p;
  tin[root] = T++;
  for (int i = 0; i < v[root].size(); i++) {
    if (p == v[root][i]) continue;
    dfs(v[root][i], root, v, d + 1);
  }
  tout[root] = T++;
}
string fun(vector<vector<int>>& v, vector<int>& q, int mx) {
  for (int i = 0; i < q.size(); i++) {
    if (tin[q[i]] <= tin[mx] && tout[q[i]] >= tout[mx]) continue;
    if (tin[parent[q[i]]] <= tin[mx] && tout[parent[q[i]]] >= tout[mx])
      continue;
    return "NO";
  }
  return "YES";
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<vector<int>> v(n);
  for (int i = 1; i < n; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  parent.resize(n);
  tin.resize(n);
  tout.resize(n);
  dd.resize(n);
  T = 0;
  dfs(0, -1, v, 0);
  while (m > 0) {
    int k;
    cin >> k;
    vector<int> q(k);
    int mx = q[0];
    for (int i = 0; i < k; i++) {
      cin >> q[i];
      q[i]--;
      if (dd[q[i]] > dd[mx]) mx = q[i];
    }
    cout << fun(v, q, mx) << endl;
    m--;
  }
  return 0;
}
