#include <bits/stdc++.h>
using namespace std;
vector<int> in, out;
vector<vector<int> > adj;
vector<int> depth;
vector<int> parents;
int t;
void add_edge(int u, int v) {
  adj[u].push_back(v);
  adj[v].push_back(u);
}
void dfs(int child, int parent, int d) {
  in[child] = t++;
  depth[child] = d;
  parents[child] = parent;
  for (auto ch : adj[child]) {
    if (ch == parent) continue;
    dfs(ch, child, d + 1);
  }
  out[child] = t++;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int n2 = n;
  adj = vector<vector<int> >(n + 1);
  in = vector<int>(n + 1);
  out = vector<int>(n + 1);
  depth = vector<int>(n + 1);
  parents = vector<int>(n + 1);
  while (n2-- > 1) {
    int u, v;
    scanf("%d%d", &u, &v);
    add_edge(u, v);
  }
  dfs(1, -1, 0);
  while (m--) {
    vector<int> x;
    int k;
    scanf("%d", &k);
    int a;
    while (k--) {
      scanf("%d", &a);
      x.push_back(a);
    }
    int deepest = x[0];
    for (auto a : x) {
      if (depth[a] > depth[deepest]) deepest = a;
    }
    int check = 1;
    for (auto a : x) {
      if (a == deepest || parents[a] == -1) continue;
      if (in[parents[a]] > in[parents[deepest]] ||
          out[parents[a]] < out[parents[deepest]])
        check = 0;
    }
    if (check)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
