#include <bits/stdc++.h>
using namespace std;
const int maxx = 2e5 + 10;
vector<int> G[maxx];
int in[maxx], out[maxx], fu[maxx];
int cnt = 0;
void dfs(int u, int par) {
  fu[u] = par;
  in[u] = ++cnt;
  for (int i = 0; i < G[u].size(); i++) {
    int u1 = G[u][i];
    if (u1 == par) {
      continue;
    } else {
      dfs(u1, u);
    }
  }
  out[u] = cnt;
}
int main() {
  int n, T, u, v;
  cin >> n >> T;
  for (int i = 1; i < n; i++) {
    cin >> u >> v;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  dfs(1, 0);
  while (T--) {
    int t;
    cin >> t;
    int l = 1, r = n;
    while (t--) {
      int ask;
      cin >> ask;
      if (ask != 1) {
        ask = fu[ask];
      }
      l = max(l, in[ask]);
      r = min(r, out[ask]);
    }
    if (l <= r) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
