#include <bits/stdc++.h>
using namespace std;
const long long int maxn = 2e5 + 1;
vector<long long int> adj_list[maxn];
vector<long long int> tin, tout;
vector<long long int> level;
long long int timer;
vector<long long int> parent;
void dfs(long long int s, long long int p) {
  tin[s] = ++timer;
  parent[s] = p;
  for (auto it : adj_list[s]) {
    if (it != p) {
      level[it] = level[s] + 1;
      dfs(it, s);
    }
  }
  tout[s] = ++timer;
}
bool isAncestor(long long int u, long long int v) {
  return (tin[u] <= tin[v] && tout[u] >= tout[v]);
}
void solve() {
  long long int N, M;
  cin >> N >> M;
  parent.resize(N + 1);
  tin.resize(N + 1);
  tout.resize(N + 1);
  level.resize(N + 1);
  timer = 0;
  level[1] = 0;
  for (long long int i = 0; i < N - 1; i++) {
    long long int u, v;
    cin >> u >> v;
    adj_list[u].push_back(v);
    adj_list[v].push_back(u);
  }
  dfs(1, 1);
  for (long long int m = 0; m < M; m++) {
    long long int k;
    cin >> k;
    vector<long long int> nodes;
    long long int maxlevel = 0, maxnode = 1;
    for (long long int i = 0; i < k; i++) {
      long long int x;
      cin >> x;
      nodes.push_back(x);
      if (level[x] > maxlevel) {
        maxlevel = level[x];
        maxnode = x;
      }
    }
    bool ok = true;
    for (long long int i = 0; i < k; i++) {
      if (!isAncestor(parent[nodes[i]], maxnode)) {
        ok = false;
        break;
      }
    }
    if (ok)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int T = 1, p = 0;
  do {
    solve();
    p++;
  } while (p < T);
  return 0;
}
