#include <bits/stdc++.h>
using namespace std;
vector<long long> adj[200001];
long long n, m, t;
long long d[200001], p[200001], tin[200001], tout[200001];
void dfs(long long s, long long par) {
  tin[s] = t++;
  for (auto i : adj[s]) {
    if (i == par) continue;
    d[i] = d[s] + 1;
    p[i] = s;
    dfs(i, s);
  }
  tout[s] = t++;
  return;
}
bool yes(long long v, long long u) {
  return tin[v] <= tin[u] && tout[v] >= tout[u];
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (long long i = 0; i < n - 1; i++) {
    long long u, w;
    cin >> u >> w;
    u--;
    w--;
    adj[u].push_back(w);
    adj[w].push_back(u);
  }
  d[0] = 0;
  p[0] = -1;
  t = 0;
  dfs(0, -1);
  while (m--) {
    long long k, ver = 0, mx = -1;
    cin >> k;
    vector<long long> v(k);
    for (long long i = 0; i < k; i++) {
      cin >> v[i];
      v[i]--;
      if (mx < d[v[i]]) {
        mx = d[v[i]];
        ver = v[i];
      }
      if (v[i] != 0) v[i] = p[v[i]];
    }
    long long ok{1};
    for (auto i : v)
      if (!yes(i, ver)) {
        ok = 0;
        break;
      }
    ok == 1 ? puts("YES") : puts("NO");
  }
  return 0;
}
