#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int nax = 2e5 + 7;
int n, q;
vector<vector<int>> adj;
int timer = 0;
vector<int> tin, tout, parent, height;
void dfs(int u, int p = -1, int h = 0) {
  tin[u] = ++timer;
  parent[u] = p;
  height[u] = h;
  for (int v : adj[u]) {
    if (v == p) continue;
    dfs(v, u, h + 1);
  }
  tout[u] = ++timer;
}
void query() {
  int n;
  cin >> n;
  vector<int> v(n);
  int farthest = -1, farthest_height = -1;
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
    --v[i];
    if (farthest_height < height[v[i]]) {
      farthest = v[i];
      farthest_height = height[v[i]];
    }
  }
  for (int i = 0; i < (int)v.size(); ++i) {
    if (v[i] == 0 || v[i] == farthest) continue;
    v[i] = parent[v[i]];
  }
  for (int i = 0; i < (int)v.size(); ++i) {
    if (v[i] == 0 || v[i] == farthest) continue;
    if (tin[v[i]] <= tin[farthest] && tout[v[i]] >= tout[farthest])
      continue;
    else {
      cout << "NO"
           << "\n";
      return;
    }
  }
  cout << "YES"
       << "\n";
}
void solve() {
  cin >> n >> q;
  tin.resize(n);
  tout.resize(n);
  adj.resize(n);
  parent.resize(n);
  height.resize(n);
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    --u, --v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs(0);
  while (q--) {
    query();
  }
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
