#include <bits/stdc++.h>
using namespace std;
vector<int> adjl[200001];
int dp[21][200002];
int level[200002];
int jump(int x, int y) {
  for (int j = 20; j >= 0; j--) {
    if ((y >= (1 << j))) {
      y = y - (1 << j);
      x = dp[j][x];
    }
  }
  return x;
}
int lca(int a, int b) {
  if (level[a] < level[b]) {
    swap(a, b);
  }
  a = jump(a, level[a] - level[b]);
  if (a == b) {
    return a;
  } else {
    for (int j = 20; j >= 0; j--) {
      if (dp[j][a] != dp[j][b]) {
        a = dp[j][a];
        b = dp[j][b];
      }
    }
    return dp[0][a];
  }
}
int main() {
  int n, q;
  cin >> n >> q;
  map<int, map<int, int>> mapa;
  int vis[n];
  for (int i = 0; i < n; i++) {
    vis[i] = 0;
  }
  for (int i = 0; i < (n - 1); i++) {
    int x, y;
    cin >> x >> y;
    adjl[x - 1].push_back(y - 1);
    mapa[x - 1][y - 1]++;
    mapa[y - 1][x - 1]++;
    adjl[y - 1].push_back(x - 1);
  }
  queue<int> q1;
  q1.push(0);
  vis[0]++;
  level[0] = 0;
  while (!q1.empty()) {
    int a = q1.front();
    q1.pop();
    for (int i = 0; i < adjl[a].size(); i++) {
      if ((vis[adjl[a][i]] == 0)) {
        vis[adjl[a][i]]++;
        q1.push(adjl[a][i]);
        level[adjl[a][i]] = level[a] + 1;
        dp[0][adjl[a][i]] = a;
      }
    }
  }
  dp[0][0] = 0;
  dp[0][n + 1] = n + 1;
  for (int j = 1; j <= 20; j++) {
    for (int i = n - 1; i >= 0; i--) {
      dp[j][i] = dp[j - 1][dp[j - 1][i]];
    }
  }
  while (q--) {
    vector<pair<int, int>> v;
    int k;
    cin >> k;
    int v1[k];
    for (int i = 0; i < k; i++) {
      cin >> v1[i];
      v1[i]--;
      v.push_back({level[v1[i]], v1[i]});
    }
    sort(v.begin(), v.end());
    int t1 = 0;
    for (int i = 1; i < v.size(); i++) {
      int x = lca(v[i].second, v[i - 1].second);
      if (x != v[i].second and x != v[i - 1].second) {
        if (mapa[x][v[i].second] == 0 and mapa[x][v[i - 1].second] == 0) {
          t1++;
        }
      }
    }
    if (t1 > 0) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
}
