#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int n, m;
vector<vector<int>> addj(N);
struct LCA {
  vector<int> height, euler, first, segtree, par;
  vector<bool> visited;
  int n;
  LCA(vector<vector<int>> &adj, int root = 0) {
    n = adj.size();
    height.resize(n);
    first.resize(n);
    par.resize(n);
    euler.reserve(n * 2);
    visited.assign(n, false);
    dfs(adj, root, 0);
    int m = euler.size();
    segtree.resize(m * 4);
    build(1, 0, m - 1);
  }
  void dfs(vector<vector<int>> &adj, int node, int parent, int h = 0) {
    visited[node] = true;
    height[node] = h;
    first[node] = euler.size();
    par[node] = parent;
    euler.push_back(node);
    for (auto to : adj[node]) {
      if (!visited[to]) {
        dfs(adj, to, node, h + 1);
        euler.push_back(node);
      }
    }
  }
  void build(int node, int b, int e) {
    if (b == e) {
      segtree[node] = euler[b];
    } else {
      int mid = (b + e) / 2;
      build(node << 1, b, mid);
      build(node << 1 | 1, mid + 1, e);
      int l = segtree[node << 1], r = segtree[node << 1 | 1];
      segtree[node] = (height[l] < height[r]) ? l : r;
    }
  }
  int query(int node, int b, int e, int L, int R) {
    if (b > R || e < L) return -1;
    if (b >= L && e <= R) return segtree[node];
    int mid = (b + e) >> 1;
    int left = query(node << 1, b, mid, L, R);
    int right = query(node << 1 | 1, mid + 1, e, L, R);
    if (left == -1) return right;
    if (right == -1) return left;
    return height[left] < height[right] ? left : right;
  }
  int lca(int u, int v) {
    int left = first[u], right = first[v];
    if (left > right) swap(left, right);
    return query(1, 0, euler.size() - 1, left, right);
  }
};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i < n; ++i) {
    int u, v;
    cin >> u >> v;
    addj[u].push_back(v);
    addj[v].push_back(u);
  }
  LCA lca = LCA(addj, 1);
  while (m--) {
    int k, mx = -1, node = -1;
    cin >> k;
    vector<int> v(k);
    for (auto &it : v) {
      cin >> it;
      if (lca.height[it] > mx) mx = lca.height[it], node = it;
    }
    bool valid = 1;
    for (auto &it : v)
      if (lca.lca(it, node) != it && lca.lca(it, node) != lca.par[it])
        valid = 0;
    cout << (valid ? "YES" : "NO") << '\n';
  }
  return 0;
}
