#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
vector<vector<int>> tr;
vector<int> tin, tout;
vector<int> pr, h;
int n, timer = 0;
void dfs(int v, int p) {
  tin[v] = timer++;
  pr[v] = p;
  if (v != 0) h[v] = h[p] + 1;
  for (int it : tr[v]) {
    if (it != p) {
      dfs(it, v);
    }
  }
  tout[v] = timer++;
}
bool isancestor(int u, int v) { return tin[u] <= tin[v] && tout[v] <= tout[u]; }
void solve() {
  int m;
  cin >> n >> m;
  tr.resize(n);
  tin.resize(n);
  tout.resize(n);
  pr.resize(n);
  h.resize(n);
  for (signed i = 0; i < n - 1; ++i) {
    int x, y;
    cin >> x >> y;
    --x, --y;
    tr[x].push_back(y);
    tr[y].push_back(x);
  }
  dfs(0, 0);
  while (m--) {
    int k;
    cin >> k;
    vector<int> qr(k);
    for (signed i = 0; i < k; ++i) cin >> qr[i], qr[i] = pr[qr[i] - 1];
    bool f = 1;
    int max_dep_u = qr[0];
    for (signed i = 1; i < k; ++i)
      if (h[qr[i]] > h[max_dep_u]) max_dep_u = qr[i];
    for (int i = 0; i < k; ++i) {
      f &= isancestor(qr[i], max_dep_u);
    }
    if (f)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
signed main() {
  signed t = 1;
  while (t--) solve();
}
