#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100011;
const long long INF = (1 << 29) + 123;
const long long MOD = 1000000007;
const long double PI = 4 * atan((long double)1);
template <typename T>
bool ckmin(T& a, const T& b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T>
bool ckmax(T& a, const T& b) {
  return b > a ? a = b, 1 : 0;
}
const int MX = 2e5 + 5;
const int LOGMX = 20;
int ti[MX], to[MX];
int par[MX];
vector<int> edges[MX];
int l[MX];
int n, m, k, t = 0;
void dfs(int second, int p, int level) {
  l[second] = level;
  ti[second] = t++;
  for (auto& a : edges[second]) {
    if (a != p) {
      par[a] = second;
      dfs(a, second, level + 1);
    }
  }
  to[second] = t;
}
void preprocess() {
  par[1] = 0;
  ti[0] = -1;
  to[0] = MX;
  dfs(1, 0, 0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  int u, w;
  for (int i = 0; i < n - 1; i++) {
    cin >> u >> w;
    edges[u].push_back(w);
    edges[w].push_back(u);
  }
  preprocess();
  int marked[MX];
  for (int i = 0; i < m; i++) {
    cin >> k;
    int v[k];
    vector<pair<int, int> > heights;
    for (int j = 0; j < k; j++) {
      cin >> v[j];
      v[j] = par[v[j]];
      marked[v[j]] = 1;
      heights.push_back(make_pair(l[v[j]], v[j]));
    }
    sort(heights.begin(), heights.end(), greater<pair<int, int> >());
    bool ok = true;
    for (int j = 0; j < k - 1; j++) {
      u = heights[j + 1].second;
      w = heights[j].second;
      if (!(ti[u] <= ti[w] && to[w] <= to[u])) {
        ok = false;
        break;
      }
    }
    if (ok)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
    for (int j = 0; j < k; j++) marked[v[j]] = 0;
  }
  return 0;
}
