#include <bits/stdc++.h>
using namespace std;
const long long MX = 2e5 + 10;
const long long K = 20;
vector<long long> adj[MX];
long long F[K][MX];
long long D[MX];
void lca_dfs(long long u) {
  for (long long v : adj[u]) {
    if (v == F[0][u]) continue;
    F[0][v] = u;
    D[v] = D[u] + 1;
    lca_dfs(v);
  }
  return;
}
void lca_init(long long x, long long n) {
  D[x] = 0;
  F[0][x] = -1;
  lca_dfs(x);
  for (long long k = 1; k < K; k++) {
    for (long long x = 0; x < n; x++) {
      if (F[k - 1][x] < 0)
        F[k][x] = -1;
      else
        F[k][x] = F[k - 1][F[k - 1][x]];
    }
  }
  return;
}
long long lca(long long x, long long y) {
  if (D[x] < D[y]) swap(x, y);
  for (long long k = K - 1; k >= 0; k--) {
    if (D[x] - (1ll << k) >= D[y]) x = F[k][x];
  }
  if (x == y) return y;
  for (long long k = K - 1; k >= 0; k--) {
    if (F[k][x] != F[k][y]) {
      x = F[k][x];
      y = F[k][y];
    }
  }
  return F[0][x];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout.precision(10);
  cout << fixed;
  long long n, q, x, y;
  cin >> n >> q;
  for (long long i = 0; i < n - 1; i++) {
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  lca_init(1, n + 1);
  long long cn;
  for (long long i = 0; i < q; i++) {
    cin >> cn;
    bool ok = true;
    long long mx = -1;
    long long nod = -1;
    vector<long long> query(cn, 0);
    for (long long i = 0; i < cn; i++) {
      cin >> query[i];
      if (D[query[i]] > mx) {
        mx = D[query[i]];
        nod = query[i];
      }
    }
    for (long long i = 0; i < cn; i++) {
      long long aux = lca(nod, query[i]);
      if (!(aux == query[i] || aux == F[0][query[i]])) {
        ok = false;
      }
    }
    if (ok) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
