#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
long long n, m;
long long tin[N], tout[N];
vector<long long> g[N];
long long parent[N], lvl[N];
long long t = 0;
void dfs(long long u, long long par, long long level) {
  ++t;
  long long i = t;
  tin[u] = t;
  parent[u] = par;
  lvl[u] = level;
  for (auto &it : g[u]) {
    if (it == par) continue;
    dfs(it, u, level + 1);
  }
  tout[u] = t;
}
long long isAncestor(long long u, long long v) {
  return tin[u] <= tin[v] && tout[u] >= tout[v];
}
bool comp(long long u, long long v) { return lvl[u] < lvl[v]; }
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> m;
  for (long long i = 1; i <= n - 1; i++) {
    long long u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  g[0].push_back(1);
  dfs(0, 0, 0);
  while (m--) {
    long long k;
    cin >> k;
    vector<long long> v;
    for (long long i = 0; i < k; i++) {
      long long u;
      cin >> u;
      v.push_back(parent[u]);
    }
    long long flag = 1;
    sort(v.begin(), v.end(), comp);
    for (long long i = 0; i + 1 < v.size(); i++)
      flag &= isAncestor(v[i], v[i + 1]);
    if (flag)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
  return 0;
}
