#include <bits/stdc++.h>
using namespace std;
const int N = 200 * 1001, D = 20;
int p[N][D], depth[N];
vector<int> g[N];
void dfs(int v, int par) {
  depth[v] = depth[par] + 1;
  p[v][0] = par;
  for (int i = 1; i < D; i++) p[v][i] = p[p[v][i - 1]][i - 1];
  for (int u : g[v])
    if (u != par) dfs(u, v);
}
int atHeight(int v, int h) {
  for (int i = 0; h >= (1 << i); i++)
    if (h & (1 << i)) v = p[v][i];
  return v;
}
bool isAncestor(int anc, int u) {
  return anc == atHeight(u, depth[u] - depth[anc]);
}
bool compare(int u, int v) { return depth[u] < depth[v]; }
bool formPath(int* u, int k) {
  sort(u, u + k, compare);
  for (int i = 0; i < k - 1; i++)
    if (!isAncestor(p[u[i]][0], p[u[i + 1]][0])) return false;
  return true;
}
int main() {
  iostream::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(1, 1);
  while (m--) {
    int k;
    cin >> k;
    int* u = new int[k];
    for (int i = 0; i < k; i++) cin >> u[i];
    cout << (formPath(u, k) ? "YES" : "NO") << '\n';
  }
}
