#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
vector<int> adj[N];
int tin[N], tout[N], pr[N], T, dep[N];
void dfs(int first) {
  tin[first] = T++;
  for (auto second : adj[first]) {
    if (second != pr[first]) {
      pr[second] = first;
      dep[second] = dep[first] + 1;
      dfs(second);
    }
  }
  tout[first] = T;
}
bool anc(int first, int second) {
  return tin[first] <= tin[second] && tout[first] >= tout[second];
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n - 1; ++i) {
    int v, u;
    cin >> v >> u;
    adj[--v].push_back(--u);
    adj[u].push_back(v);
  }
  dfs(0);
  while (m--) {
    int k;
    cin >> k;
    vector<int> v(k);
    int en = -1;
    for (int i = 0; i < k; ++i) {
      cin >> v[i];
      --v[i];
      if (en == -1 || dep[v[i]] > dep[en]) en = v[i];
      v[i] = pr[v[i]];
    }
    bool ok = 1;
    for (auto first : v) ok &= anc(first, en);
    cout << (ok ? "YES\n" : "NO\n");
  }
  return 0;
}
