#include <bits/stdc++.h>
using namespace std;
int play(vector<int> a[], int s, pair<int, int> vis[], int pr[], int p, int l) {
  int i, j, k, n;
  vis[s].first = l;
  for (i = 0, j = 0; i < a[s].size(); i++) {
    if (a[s][i] != p) {
      pr[a[s][i]] = s;
      j += play(a, a[s][i], vis, pr, s, l + j);
    }
  }
  if (j == 0) j = 1;
  vis[s].second = vis[s].first + j - 1;
  return j;
}
void solve() {
  int n, k, m, q, i, j, mi, ma, ans = 0;
  cin >> n >> q;
  vector<int> a[n];
  int pr[n];
  pair<int, int> vis[n];
  for (i = 0; i < n - 1; i++) {
    cin >> j >> k;
    a[j - 1].push_back(k - 1);
    a[k - 1].push_back(j - 1);
  }
  pr[0] = 0;
  play(a, 0, vis, pr, -1, 0);
  for (i = 0; i < q; i++) {
    cin >> m;
    for (j = 0, mi = ma = -1; j < m; j++) {
      cin >> k;
      k = pr[k - 1];
      if (vis[k].first > ma || ma == -1) ma = vis[k].first;
      if (vis[k].second < mi || mi == -1) mi = vis[k].second;
    }
    if (ma <= mi)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    solve();
  }
}
