#include <bits/stdc++.h>
using namespace std;
vector<std::vector<int> > adj(200005);
int lev[200005], v[200005], par[200005], st[200005], en[200005], ti = 0;
void dfs(int x) {
  st[x] = ti;
  for (auto it : adj[x]) {
    if (!lev[it]) {
      lev[it] = 1 + lev[x];
      par[it] = x;
      ti++;
      dfs(it);
    }
  }
  en[x] = ti;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m, i, j, x, y;
  cin >> n >> m;
  for (i = 1; i < n; i++) {
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
    st[i] = en[i] = -1;
  }
  st[n] = en[n] = -1;
  lev[1] = 1;
  par[1] = 1;
  dfs(1);
  while (m--) {
    vector<int> cur, vis;
    int a = 0, b = -1, fl = 0;
    cin >> x;
    while (x--) {
      cin >> y;
      cur.push_back(y);
      if (lev[y] > a) {
        a = lev[y];
        b = y;
      }
    }
    for (auto it : cur) {
      if (st[par[it]] <= st[b] && en[par[it]] >= en[b]) {
        ;
      } else {
        fl = 1;
      }
    }
    if (fl) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
    }
  }
  return 0;
}
