#include <bits/stdc++.h>
using namespace std;
vector<int> v, v1, v2, v3, v4, v5, v6;
vector<pair<long long int, long long int> > vec, vec1, vec2, vec3;
vector<int> adj[200005];
map<long long int, long long int> Mp, Mp1;
set<long long int> st, st1;
queue<long long int> Q;
stack<long long int> Stk;
multiset<pair<long long int, long long int> > S;
int n, m, k, T, t, cnt;
int parent[200005];
int start[200005];
int finish[200005];
int visited[200005];
void Reset() {}
void dfs(int u) {
  visited[u] = 1;
  start[u] = ++cnt;
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (visited[v] == 0) {
      parent[v] = u;
      dfs(v);
    }
  }
  finish[u] = cnt;
}
void Input() {
  long long int a, b;
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
}
void Calculation() {
  int a;
  dfs(1);
  while (m--) {
    cin >> k;
    int maxstart = INT_MIN, minfinish = INT_MAX;
    while (k--) {
      cin >> a;
      if (a != 1) a = parent[a];
      maxstart = max(maxstart, start[a]);
      minfinish = min(minfinish, finish[a]);
    }
    if (maxstart <= minfinish) {
      cout << "YES" << endl;
      ;
    } else {
      cout << "NO" << endl;
      ;
    }
  }
}
void solve() {
  Reset();
  Input();
  Calculation();
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  t = 1;
  while (t--) {
    T++;
    solve();
  }
  return 0;
}
