#include <bits/stdc++.h>
using namespace std;
const long long maxN = 1e18;
const long long minN = -1e18;
const long long MOD = 1e9 + 7;
const long long MOD1 = 998244353;
const int baseHash = 331;
const int bigNumLength = 5000;
const long double PI = acos(-1);
const long long limit = 2e5 + 5;
const long long limit1 = 1e6 + 5;
const long long limit2 = 1e3 + 5;
pair<long long, long long> dir[] = {{0, 1}, {1, 0},  {0, -1}, {-1, 0},
                                    {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
long long n, q;
vector<long long> g[limit];
long long depth[limit], a[limit];
long long par[limit][21];
bool visit[limit];
void dfs(long long u, long long curDepth) {
  visit[u] = true;
  depth[u] = curDepth;
  for (auto it : g[u]) {
    if (!visit[it]) {
      dfs(it, curDepth + 1);
      par[it][0] = u;
    }
  }
}
void init() {
  par[1][0] = 1;
  for (int k = (1); k <= (20); ++k) {
    for (int i = (1); i <= (n); ++i) {
      par[i][k] = par[par[i][k - 1]][k - 1];
    }
  }
}
long long lca(long long u, long long v) {
  if (depth[u] < depth[v]) swap(u, v);
  for (int k = (20); k >= (0); --k) {
    if (depth[par[u][k]] >= depth[v]) u = par[u][k];
  }
  for (int k = (20); k >= (0); --k) {
    if (par[u][k] != par[v][k]) u = par[u][k], v = par[v][k];
  }
  while (u != v) u = par[u][0], v = par[v][0];
  return u;
}
void solveProblem() {
  dfs(1, 0);
  init();
  while (q--) {
    long long deepest = -1, last, k;
    bool ok = true;
    cin >> k;
    for (int i = (1); i <= (k); ++i) {
      cin >> a[i];
      if (depth[a[i]] > deepest) {
        deepest = depth[a[i]];
        last = a[i];
      }
    }
    for (int i = (1); i <= (k); ++i) {
      if (a[i] != last) {
        long long parent = lca(a[i], last);
        if (depth[a[i]] - depth[parent] > 1) {
          ok = false;
          break;
        }
      }
    }
    cout << (ok ? "YES" : "NO") << '\n';
  }
}
void fastInput() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void readInput() {
  cin >> n >> q;
  for (int i = (1); i <= (n - 1); ++i) {
    long long u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
}
int main() {
  fastInput();
  readInput();
  solveProblem();
}
