#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const int fx[4][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
const int fxx[8][2] = {{0, 1}, {0, -1}, {1, 0},  {-1, 0},
                       {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
int N = 2e5 + 10;
vector<vector<int> > gr(N);
int dfs_time = 0;
vector<int> color(N, 0);
vector<int> tin(N, 0);
vector<int> tout(N, 0);
vector<int> parent(N, -1);
vector<int> depth(N, 0);
void dfs(int u, int dep) {
  color[u] = 1;
  depth[u] = dep;
  tin[u] = dfs_time++;
  for (auto v : gr[u]) {
    if (color[v] == 0) {
      parent[v] = u;
      dfs(v, dep + 1);
    }
  }
  tout[u] = dfs_time++;
  color[u] = 2;
  return;
}
bool checkanc(int parent, int child) {
  return tin[parent] < tin[child] && tout[parent] > tout[child];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  ;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    ;
    gr[u].push_back(v);
    gr[v].push_back(u);
  }
  parent[1] = 1;
  dfs(1, 0);
  for (int i = 0; i < m; i++) {
    int k;
    cin >> k;
    ;
    vector<int> vec(k);
    for (int i = 0; i < k; i++) {
      cin >> vec[i];
    };
    for (int i = 0; i < k; i++) {
      vec[i] = parent[vec[i]];
    }
    int maxd = -0x3f3f3f3f;
    int maxe;
    ;
    ;
    for (int i = 0; i < k; i++) {
      ;
      if (depth[vec[i]] > maxd) {
        maxd = depth[vec[i]];
        maxe = vec[i];
      }
    };
    int ans = 1;
    for (int i = 0; i < k; i++) {
      if (vec[i] != maxe && !checkanc(vec[i], maxe)) {
        ans = 0;
      }
    }
    ans ? cout << "YES" << endl : cout << "NO" << endl;
  }
  return 0;
}
