#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> adj(200000);
vector<vector<int>> succ(200000, vector<int>(22, -1));
vector<int> lev(200000);
void dfs(int n, int p, int d) {
  lev[n] = d;
  if (p != -1) {
    succ[n][0] = p;
  }
  for (int i = 1; i < 22; ++i) {
    if (succ[n][i - 1] != -1) {
      succ[n][i] = succ[succ[n][i - 1]][i - 1];
    }
  }
  for (int i = 0; i < adj[n].size(); ++i) {
    if (adj[n][i] != p) {
      dfs(adj[n][i], n, d + 1);
    }
  }
}
bool comp(int lhs, int rhs) {
  if (lev[rhs] >= lev[lhs])
    return false;
  else
    return true;
}
int getsamelev(int level, int s) {
  if (lev[s] == level) return s;
  for (int i = 21; i >= 0; --i) {
    if ((lev[s] - (1 << i)) < level)
      continue;
    else
      s = succ[s][i];
  }
  return s;
}
bool solve_query(vector<int> data) {
  vector<int> pt;
  for (int i = 0; i < data.size(); ++i) {
    if (data[i] == 0) continue;
    pt.push_back(succ[data[i]][0]);
  }
  sort(pt.begin(), pt.end(), comp);
  for (int i = 0; i < (int)pt.size() - 1; ++i) {
    if (getsamelev(lev[pt[i + 1]], pt[i]) != pt[i + 1]) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    adj[a - 1].push_back(b - 1);
    adj[b - 1].push_back(a - 1);
  }
  dfs(0, -1, 0);
  vector<int> data;
  while (m--) {
    data.clear();
    int k;
    cin >> k;
    for (int i = 0; i < k; ++i) {
      int a;
      cin >> a;
      data.push_back(a - 1);
    }
    if (solve_query(data))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
