#include <bits/stdc++.h>
using namespace std;
long long n, m;
vector<long long> p, in_time, out_time, level;
vector<vector<long long> > g;
long long k;
void dfs_time(long long node, long long parent, long long l) {
  in_time[node] = k++;
  p[node] = parent;
  level[node] = l;
  for (auto i : g[node]) {
    if (i != parent) {
      dfs_time(i, node, l + 1);
    }
  }
  out_time[node] = k++;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  k = 1;
  p.resize(n + 1);
  in_time.resize(n + 1);
  out_time.resize(n + 1);
  level.resize(n + 1);
  g.resize(n + 1, vector<long long>());
  for (long long i = 0; i < n - 1; i++) {
    long long x, y;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  dfs_time(1, 1, 0);
  for (long long i = 0; i < m; i++) {
    long long kk;
    cin >> kk;
    vector<long long> ans;
    for (long long j = 0; j < kk; j++) {
      long long x;
      cin >> x;
      ans.push_back(p[x]);
    }
    long long mx = in_time[ans[0]];
    long long mn = out_time[ans[0]];
    for (long long i = 1; i < ans.size(); i++) {
      mx = max(mx, in_time[ans[i]]);
      mn = min(mn, out_time[ans[i]]);
    }
    if (mx < mn)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
