#include <bits/stdc++.h>
using namespace std;
long long int mod(long long int x) { return x % 1000000007; }
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int mod(long long int num, long long int den) {
  return mod(mod(num) * power(den, 1000000007 - 2, 1000000007));
}
void dfs(long long int s, vector<bool> &vis, vector<vector<long long int> > &G,
         vector<long long int> &tin, vector<long long int> &tout,
         long long int &T) {
  vis[s] = true;
  tin[s] = T++;
  for (auto v : G[s]) {
    if (!vis[v]) {
      dfs(v, vis, G, tin, tout, T);
    }
  }
  tout[s] = T++;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m;
  cin >> n >> m;
  vector<vector<long long int> > G(n + 1);
  for (long long int i = 0; i < (n - 1); ++i) {
    long long int a, b;
    cin >> a >> b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  vector<long long int> tin(n + 1), tout(n + 1);
  vector<bool> vis2(n + 1);
  long long int T = 0;
  dfs(1, vis2, G, tin, tout, T);
  vector<long long int> par(n + 1, -1);
  vector<bool> vis(n + 1);
  vector<long long int> dis(n + 1, INT_MAX);
  dis[1] = 0;
  vis[1] = true;
  queue<long long int> q;
  q.push(1);
  while (!q.empty()) {
    auto u = q.front();
    q.pop();
    for (auto v : G[u]) {
      if (!vis[v]) {
        vis[v] = true;
        dis[v] = dis[u] + 1;
        q.push(v);
        par[v] = u;
      }
    }
  }
  while (m--) {
    long long int x;
    cin >> x;
    vector<long long int> nds(x);
    long long int node = 1;
    long long int dist = 0;
    for (long long int i = 0; i < x; ++i) {
      cin >> nds[i];
      if (dis[nds[i]] > dist) {
        dist = dis[nds[i]];
        node = nds[i];
      }
    }
    bool ok = true;
    for (long long int i = 0; i < x; ++i) {
      if (nds[i] != node && nds[i] != 1) {
        nds[i] = par[nds[i]];
        if (!(tin[nds[i]] <= tin[node] && tout[node] <= tout[nds[i]])) {
          ok = false;
          break;
        }
      }
    }
    if (ok)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
