#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
int idx = 0;
vector<int> adj[N], par(N), start(N), en(N);
void go(int u, int parent) {
  start[u] = idx++;
  par[u] = parent;
  for (auto &v : adj[u]) {
    if (v == parent) continue;
    go(v, u);
  }
  en[u] = idx;
}
void run() {
  int n, m, i, j, k, q;
  cin >> n >> m;
  for (i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    --u;
    --v;
    adj[u].emplace_back(v);
    adj[v].emplace_back(u);
  }
  go(0, 0);
  while (m--) {
    cin >> k;
    int lo = -1, hi = N + 1;
    for (j = 0; j < k; j++) {
      cin >> q;
      --q;
      int p = par[q];
      lo = max(lo, start[p]);
      hi = min(hi, en[p]);
    }
    cout << (lo < hi ? "YES" : "NO") << endl;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  while (t--) {
    run();
  }
}
