#include <bits/stdc++.h>
using namespace std;
const long long N = 200009;
long long par[N];
long long dept[N];
vector<long long> gr[N];
long long n, k, tim, max_depth_node;
long long in[N];
long long out[N];
void dfs(long long node, long long parent, long long depth) {
  dept[node] = depth;
  par[node] = parent;
  in[node] = tim++;
  for (auto ne : gr[node]) {
    if (ne != parent) {
      dfs(ne, node, depth + 1);
    }
  }
  out[node] = tim++;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    cin >> n >> k;
    for (long long i = 1; i < n; i++) {
      long long u, v;
      cin >> u >> v;
      gr[u].push_back(v);
      gr[v].push_back(u);
    }
    dfs(1, 0, 0);
    while (k--) {
      long long sz;
      cin >> sz;
      long long a[sz + 4];
      for (long long i = 1; i <= sz; i++) {
        cin >> a[i];
      }
      max_depth_node = a[1];
      for (long long i = 2; i <= sz; i++) {
        if (dept[a[i]] > dept[max_depth_node]) max_depth_node = a[i];
      }
      for (long long i = 1; i <= sz; i++) {
        if (a[i] != 1) {
          a[i] = par[a[i]];
        }
      }
      long long f = 1;
      for (long long i = 1; i <= sz; i++) {
        if (in[a[i]] > in[max_depth_node] || out[a[i]] < out[max_depth_node]) {
          f = 0;
          break;
        }
      }
      if (f == 1) {
        cout << "YES"
             << "\n";
      } else {
        cout << "NO"
             << "\n";
      }
    }
  }
  return 0;
}
