#include <bits/stdc++.h>
const long long mod = 1000000007;
const long long mod1 = 998244353;
using namespace std;
vector<long long> v[200005];
bool visited[200005];
long long dep[200005], par[200005], tin[200005], tout[200005];
long long t = 0;
void dfs(long long x, long long parent, long long depth) {
  visited[x] = true;
  tin[x] = t++;
  par[x] = parent;
  dep[x] = depth;
  for (long long i = 0; i < v[x].size(); i++) {
    if (!visited[v[x][i]]) {
      dfs(v[x][i], x, depth + 1);
    }
  }
  tout[x] = t++;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m;
  cin >> n >> m;
  for (long long i = 0; i < n - 1; i++) {
    long long x, y;
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  dfs(1, -1, 0);
  while (m--) {
    long long k;
    cin >> k;
    long long arr[k];
    for (long long i = 0; i < k; i++) cin >> arr[i];
    vector<long long> vv;
    for (long long i = 0; i < k; i++) {
      if (par[arr[i]] != -1) vv.push_back(par[arr[i]]);
    }
    long long mx = -1, d;
    long long cc = vv.size();
    for (long long i = 0; i < cc; i++) {
      if (mx < dep[vv[i]]) {
        mx = dep[vv[i]];
        d = vv[i];
      }
    }
    bool ch = true;
    for (long long i = 0; i < cc; i++) {
      ch &= (tin[d] >= tin[vv[i]] and tout[d] <= tout[vv[i]]);
    }
    if (ch)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
