#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 1;
vector<int> gr[N];
int p[N];
int tin[N], tout[N], depth[N];
int timer;
void dfs(int cur = 1, int par = -1) {
  p[cur] = par;
  tin[cur] = ++timer;
  for (auto x : gr[cur]) {
    if (x != par) {
      depth[x] = depth[cur] + 1;
      dfs(x, cur);
    }
  }
  tout[cur] = timer;
}
bool is_ancestor(int v, int u) {
  return (tin[v] <= tin[u] && tout[u] <= tout[v]);
}
int32_t main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    gr[u].push_back(v);
    gr[v].push_back(u);
  }
  dfs();
  while (m--) {
    int k;
    cin >> k;
    vector<int> v(k);
    int farthest = 1;
    for (int i = 0; i < k; i++) {
      cin >> v[i];
      if (p[v[i]] != -1) v[i] = p[v[i]];
      if (depth[v[i]] > depth[farthest]) farthest = v[i];
    }
    bool ok = true;
    for (auto x : v) ok &= is_ancestor(x, farthest);
    if (ok)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
}
