#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
const double pi = acos(-1);
const double eps = 1e-9;
int n, k, l[maxn], lca[maxn][22];
vector<int> g[maxn];
int query(int a, int b) {
  if (l[a] < l[b]) swap(a, b);
  for (int i = 20; i >= 0; i--)
    if (l[a] - (1 << i) >= l[b]) a = lca[a][i];
  if (a == b) return a;
  for (int i = 20; i >= 0; i--)
    if (lca[a][i] && lca[a][i] != lca[b][i]) a = lca[a][i], b = lca[b][i];
  return lca[a][0];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 1; i < n; i++) {
    int a, b;
    cin >> a >> b;
    g[a].emplace_back(b);
    g[b].emplace_back(a);
  }
  queue<int> q;
  q.push(1);
  l[1] = 1;
  while (!q.empty()) {
    int nod = q.front();
    q.pop();
    for (int newn : g[nod]) {
      if (l[newn]) continue;
      l[newn] = l[nod] + 1;
      q.push(newn);
      lca[newn][0] = nod;
      for (int i = 1; i <= 20; i++) lca[newn][i] = lca[lca[newn][i - 1]][i - 1];
    }
  }
  while (k--) {
    int m;
    cin >> m;
    vector<int> v(m);
    int u = 0;
    for (int i = 0; i < m; i++) {
      cin >> v[i];
      if (l[v[i]] > l[u]) u = v[i];
    }
    bool ok = true;
    for (int i = 0; i < m && ok; i++) {
      int q = query(u, v[i]);
      if (q != u && q != v[i]) {
        v[i] = lca[v[i]][0];
        q = query(u, v[i]);
        if (q != u && q != v[i]) ok = false;
      }
    }
    if (ok)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
  return 0;
}
