#include <bits/stdc++.h>
using namespace std;
long long add(long long a, long long b) {
  a %= 1000000007;
  b %= 1000000007;
  long long p = (a + b) % 1000000007;
  return (p + 1000000007) % 1000000007;
}
long long mul(long long a, long long b) {
  a %= 1000000007;
  b %= 1000000007;
  long long p = (a * b) % 1000000007;
  return (p + 1000000007) % 1000000007;
}
vector<long long> adj[200010];
long long parent[200010], st[200010], fi[200010], tim = 0;
void dfs(long long i, long long par) {
  st[i] = tim++;
  for (long long j = 0; j < adj[i].size(); j++) {
    long long x = adj[i][j];
    if (x == par) continue;
    dfs(x, i);
    parent[x] = i;
  }
  fi[i] = tim++;
  return;
}
int main() {
  long long n, m, i, j;
  cin >> n >> m;
  for (i = 0; i < n - 1; i++) {
    long long u, v;
    cin >> v >> u;
    adj[v].push_back(u);
    adj[u].push_back(v);
  }
  dfs(1, 0);
  for (i = 0; i < m; i++) {
    long long k, u;
    cin >> k;
    vector<pair<long long, long long> > v;
    for (j = 0; j < k; j++) {
      cin >> u;
      if (u != 1) {
        v.push_back({st[parent[u]], fi[parent[u]]});
      }
    }
    sort(v.begin(), v.end());
    long long flag = 1;
    for (j = 1; j < v.size(); j++) {
      if (v[j].second > v[j - 1].second) flag = 0;
    }
    if (flag)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
