#include <bits/stdc++.h>
template <typename T>
using pair = std::pair<T, T>;
using std::cin;
using std::cout;
using std::string;
class tree {
 public:
  tree() {}
  tree(unsigned n) { resize(n); }
  void resize(unsigned n) {
    _parent = new unsigned[n + 1];
    _pre = new unsigned[n + 1];
    _post = new unsigned[n + 1];
    _tree = new std::list<unsigned>[n + 1];
    _parent[1] = 1;
  }
  void add_edge(unsigned u, unsigned v) {
    _tree[u].push_back(v);
    _tree[v].push_back(u);
  }
  void explore(unsigned u = 1) {
    _pre[u] = clock++;
    visited[u] = true;
    for (unsigned v : _tree[u]) {
      if (~visited[v]) {
        _parent[v] = u;
        explore(v);
      }
    }
    _post[u] = clock++;
  }
  unsigned pre(unsigned node) const { return _pre[node]; }
  unsigned post(unsigned node) const { return _post[node]; }
  unsigned parent(unsigned node) const { return _parent[node]; }
  ~tree() {
    delete[] _tree;
    delete[] _pre, _post, _parent;
  }

 private:
  unsigned* _parent;
  unsigned clock = 0, *_pre, *_post;
  std::bitset<200001> visited;
  std::list<unsigned>* _tree;
};
bool check(const tree& a, std::set<unsigned>& request) {
  unsigned x = *request.begin();
  pair<unsigned> min_range = {a.pre(x), a.post(x)};
  for (unsigned x : request) {
    if (min_range.first < a.pre(x) and a.post(x) < min_range.second)
      min_range = {a.pre(x), a.post(x)};
  }
  for (unsigned x : request) {
    if (a.pre(x) > min_range.first or min_range.second > a.post(x))
      return false;
  }
  return true;
}
int main() {
  tree a;
  unsigned n, m, u, v, k, x;
  std::set<unsigned> request;
  cin >> n >> m;
  a.resize(n);
  for (unsigned i = 1; i < n; ++i) {
    cin >> u >> v;
    a.add_edge(u, v);
  }
  a.explore();
  for (unsigned i = 0; i < m; ++i) {
    cin >> k;
    for (unsigned i = 0; i < k; ++i) {
      cin >> x;
      x = a.parent(x);
      if (x != 1) request.insert(x);
    }
    cout << (request.size() < 2 or check(a, request) ? "YES\n" : "NO\n");
    request.clear();
  }
  return 0;
}
