#include <bits/stdc++.h>
using namespace std;
long long int timer = 1;
long long int in[200001], out[200001], parent[200001], dist[200001];
vector<long long int> v[200001];
void dfs(long long int n, long long int src, long long int par = -1) {
  in[src] = timer++;
  for (auto it : v[src]) {
    if (it != par) {
      parent[it] = src;
      dist[it] = dist[src] + 1;
      dfs(n, it, src);
    }
  }
  out[src] = timer++;
}
bool isAncestor(long long int x, long long int y) {
  return (in[x] >= in[y] and out[x] <= out[y]);
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long int n, t;
  cin >> n >> t;
  for (long long int i = 0; i < n - 1; i++) {
    long long int x, y;
    cin >> x >> y;
    x--;
    y--;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  parent[0] = 0;
  dist[0] = 0;
  dfs(n, 0);
  while (t--) {
    long long int m;
    cin >> m;
    long long int a[m];
    for (long long int i = (0); i < (m); i++) cin >> (a)[i];
    ;
    for (long long int i = 0; i < m; i++) {
      a[i]--;
    }
    vector<pair<long long int, long long int>> depth;
    for (long long int i = 0; i < m; i++) {
      depth.push_back({dist[a[i]], parent[a[i]]});
    }
    sort(depth.rbegin(), depth.rend());
    long long int flag = 1;
    for (long long int i = 0; i < m - 1; i++) {
      if (!isAncestor(depth[i].second, depth[i + 1].second)) {
        flag = 0;
        break;
      }
    }
    if (!flag) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
  return 0;
}
