#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7, N = 2e5 + 7;
int p[N][20], d[N];
vector<int> G[N];
void dfs(int u, int pa = 0, int depth = 0) {
  d[u] = depth, p[u][0] = pa;
  for (int v : G[u])
    if (v != pa) dfs(v, u, depth + 1);
}
int up(int u, int len) {
  for (int i = 19; i >= 0; i--)
    if (len >> i & 1) u = p[u][i];
  return u;
}
bool isanc(int u, int v) { return up(v, d[v] - d[u]) == u; }
bool cmp(int a, int b) { return d[a] < d[b]; }
signed main() {
  std::ios::sync_with_stdio(0);
  std::cin.tie(0);
  ;
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  dfs(1);
  for (int j = 1; j < 20; j++)
    for (int i = 1; i <= n; i++) p[i][j] = p[p[i][j - 1]][j - 1];
  while (m--) {
    int k;
    cin >> k;
    vector<int> tt;
    for (int i = 0; i < k; i++) {
      int t;
      cin >> t;
      tt.push_back(t == 1 ? 1 : p[t][0]);
    }
    sort((tt).begin(), (tt).end(), cmp);
    bool ok = true;
    for (int i = 0; i < k - 1; i++) {
      ok &= isanc(tt[i], tt[i + 1]);
    }
    cout << (ok ? "YES" : "NO") << endl;
  }
}
