#include <bits/stdc++.h>
using namespace std;
int n, q;
vector<int> nod[200010];
int depth[200010], tin[200010], tout[200010], t, ant[200010];
void read() {
  cin >> n >> q;
  for (int i = 1; i < n; i++) {
    int a, b;
    cin >> a >> b;
    nod[a].push_back(b);
    nod[b].push_back(a);
  }
}
void calcDepths(int at, int parent, int h) {
  depth[at] = h;
  ant[at] = parent;
  tin[at] = ++t;
  for (int to : nod[at])
    if (to != parent) calcDepths(to, at, h + 1);
  tout[at] = ++t;
}
int main() {
  read();
  calcDepths(1, -1, 0);
  while (q--) {
    int m, nr;
    int biggestDepth = -1, corespNode;
    set<int> v;
    cin >> m;
    for (int i = 1; i <= m; i++) {
      cin >> nr;
      if (nr != 1) {
        nr = ant[nr];
        if (depth[nr] > biggestDepth) {
          biggestDepth = depth[nr];
          corespNode = nr;
        }
        v.insert(nr);
      }
    }
    if (v.empty()) {
      cout << "YES\n";
    } else {
      bool ok = true;
      for (int nr : v)
        if (!(tin[nr] <= tin[corespNode] && tout[nr] >= tout[corespNode]))
          ok = false;
      if (ok) {
        cout << "YES\n";
      } else {
        cout << "NO\n";
      }
    }
  }
  return 0;
}
