#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
int n, m;
const int mm = 2e5 + 10;
vector<int> graph[mm], tin(mm, 0), tout(mm, 0), parent(mm, 0), visited(mm, 0),
    height(mm, 0);
int tt = 0;
void dfs(int node, int p, int h) {
  tin[node] = tt++;
  visited[node] = 1;
  parent[node] = p;
  height[node] = h;
  for (int i : graph[node])
    if (visited[i] == 0) dfs(i, node, h + 1);
  tout[node] = tt;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    graph[u].push_back(v);
    graph[v].push_back(u);
  }
  dfs(1, 0, 0);
  while (m--) {
    int k;
    cin >> k;
    vector<int> q(k);
    for (int &i : q) cin >> i;
    int u = q[0];
    for (int i : q)
      if (height[u] < height[i]) u = i;
    for (int &i : q)
      if (i != u and i != 1) i = parent[i];
    bool yes = 1;
    for (int i : q) yes &= (tin[i] <= tin[u] and tout[i] >= tout[u]);
    if (yes)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
