#include <bits/stdc++.h>
using namespace std;
template <typename T, size_t size>
ostream &operator<<(ostream &os, const array<T, size> &arr) {
  os << '{';
  string sep;
  for (const auto &x : arr) os << sep << x, sep = ", ";
  return os << '}';
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[ ";
  for (auto v : V) os << v << " ";
  return os << "]";
}
template <class T>
ostream &operator<<(ostream &os, set<T> S) {
  os << "{ ";
  for (auto s : S) os << s << " ";
  return os << "}";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
template <class L, class R>
ostream &operator<<(ostream &os, map<L, R> M) {
  os << "{ ";
  for (auto m : M) os << "(" << m.first << ":" << m.second << ") ";
  return os << "}";
}
const int MAX = 1000010;
const int MOD2 = 998244353;
const int MOD = 1000000007;
const int INF = 0x3f;
const long long int LLINF = 0x3f3f3f3f3f3f3f3fll;
const long double EPS = 1e-7;
const int mxn = 2e5 + 5;
vector<int> edges[mxn];
vector<int> levels, par, in, out;
int timee = 0;
void dfs(int v, int p = -1, int h = 0) {
  in[v] = timee++;
  levels[v] = h;
  par[v] = p;
  for (int u : edges[v]) {
    if (levels[u] == -1) {
      dfs(u, v, h + 1);
    }
  }
  out[v] = timee++;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << fixed << setprecision(25);
  cerr << fixed << setprecision(10);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    cin >> x >> y;
    edges[x].emplace_back(y);
    edges[y].emplace_back(x);
  }
  levels.assign(n + 1, -1);
  par.assign(n + 1, -1);
  in.assign(n + 1, -1);
  out.assign(n + 1, -1);
  dfs(1);
  42;
  unordered_set<int> path;
  for (int i = 0; i < m; i++) {
    int k;
    cin >> k;
    vector<int> ver(k);
    int leaf = 1;
    for (int j = 0; j < k; j++) {
      cin >> ver[j];
      if (levels[ver[j]] > levels[leaf]) leaf = ver[j];
    }
    bool pos = true;
    for (int j : ver) {
      bool lo = (in[j] <= in[leaf] and out[leaf] <= out[j]);
      if (~par[j]) lo |= (in[par[j]] <= in[leaf] and out[leaf] <= out[par[j]]);
      pos &= lo;
    }
    cout << (pos ? "YES" : "NO") << "\n";
  }
  return 0;
}
