#include <bits/stdc++.h>
using namespace std;
int T = 0;
vector<int> tin, tout, p, d;
vector<vector<int>> g;
void dfs(int v, int par = -1, int dep = 0) {
  tin[v] = T++;
  p[v] = par;
  d[v] = dep;
  for (auto to : g[v]) {
    if (to == par) continue;
    dfs(to, v, dep + 1);
  }
  tout[v] = T++;
}
int main() {
  int n, m;
  cin >> n >> m;
  g.assign(n, vector<int>());
  tin.assign(n, -1);
  tout.assign(n, -1);
  p.assign(n, -1);
  d.assign(n, -1);
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    --u, --v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(0);
  while (m--) {
    int k;
    cin >> k;
    vector<int> v(k);
    int u = 0;
    for (int i = 0; i < k; ++i) {
      cin >> v[i];
      --v[i];
      if (d[v[i]] > d[u]) u = v[i];
    }
    for (int i = 0; i < k; ++i) {
      if (v[i] != u && v[i] != 0) v[i] = p[v[i]];
    }
    bool ok = true;
    for (auto vi : v) {
      if (tin[vi] > tin[u] || tout[u] > tout[vi]) {
        ok = false;
        break;
      }
    }
    cout << (ok ? "YES" : "NO") << endl;
  }
  return 0;
}
