#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > G;
vector<int> depth, first, last, p;
int TIME;
void dfs(int node, int parent, int d) {
  depth[node] = d;
  first[node] = ++TIME;
  p[node] = parent;
  for (int next : G[node])
    if (next != parent) dfs(next, node, d + 1);
  last[node] = TIME;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int N, Q;
  cin >> N >> Q;
  G.resize(N + 1);
  for (int i = 1; i < N; ++i) {
    int u, v;
    cin >> u >> v;
    G[u].emplace_back(v);
    G[v].emplace_back(u);
  }
  depth.resize(N + 1), first.resize(N + 1), last.resize(N + 1), p.resize(N + 1);
  dfs(1, 0, 0);
  while (Q--) {
    int K;
    cin >> K;
    vector<int> a(K);
    for (int &node : a) cin >> node;
    int lowest = a[0];
    for (int i = 1; i < K; ++i)
      if (depth[a[i]] > depth[lowest]) lowest = a[i];
    bool ok = true;
    for (int node : a) {
      if (node != 1) node = p[node];
      if (!(first[node] <= first[lowest] && first[lowest] <= last[node])) {
        ok = false;
        break;
      }
    }
    cout << (ok ? "YES\n" : "NO\n");
  }
}
