#include <bits/stdc++.h>
using namespace std;
const long long oo = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-9;
const long long N = 200100, K = 20;
long long p[N][K], d[N];
vector<long long> adj[N];
void dfs(long long i) {
  for (long long k = (1); k < (K); k++) p[i][k] = p[p[i][k - 1]][k - 1];
  for (long long j : adj[i])
    if (j != p[i][0]) {
      d[j] = d[i] + 1;
      p[j][0] = i;
      dfs(j);
    }
}
long long lca(long long a, long long b) {
  if (d[a] < d[b]) swap(a, b);
  long long dh = d[a] - d[b];
  for (long long k = (0); k < (K); k++)
    if (dh & (1 << k)) a = p[a][k];
  if (a == b) return a;
  for (long long k = (K)-1; k >= (0); k--)
    if (p[a][k] != p[b][k]) {
      a = p[a][k], b = p[b][k];
    }
  return p[a][0];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m;
  cin >> n >> m;
  for (long long i = (1); i < (n); i++) {
    long long a, b;
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  dfs(1);
  while (m--) {
    long long k;
    cin >> k;
    vector<long long> a(k);
    for (long long i = (0); i < (k); i++) cin >> a[i];
    sort(begin(a), end(a),
         [&](long long i, long long j) { return d[i] > d[j]; });
    bool ok = true;
    for (long long i = (1); i < (k); i++) {
      long long c = lca(a[0], a[i]);
      if (a[i] != c && p[a[i]][0] != c) ok = false;
    }
    cout << (ok ? "YES" : "NO") << endl;
  }
}
