#include <bits/stdc++.h>
using namespace std;
const int N = 200200;
int n, m;
int timer;
int tin[N];
int tout[N];
int parent[N];
vector<int> verr[N];
void dfs(int v, int pr = 1) {
  tin[v] = ++timer;
  for (int i = 0; i < verr[v].size(); i++) {
    int to = verr[v][i];
    if (to != pr) {
      parent[to] = v;
      dfs(to, v);
    }
  }
  tout[v] = ++timer;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    int x, y;
    cin >> x >> y;
    verr[x].push_back(y);
    verr[y].push_back(x);
  }
  dfs(1);
  while (m--) {
    int k;
    cin >> k;
    vector<int> cur(k);
    for (int i = 0; i < k; i++) {
      cin >> cur[i];
      if (cur[i] != 1) {
        cur[i] = parent[cur[i]];
      }
    }
    bool ok = true;
    sort(cur.begin(), cur.end(), [](int u, int v) { return tin[u] < tin[v]; });
    for (int i = 0; i < k - 1; i++) {
      if (tin[cur[i]] <= tin[cur[i + 1]] && tout[cur[i]] >= tout[cur[i + 1]])
        continue;
      ok = false;
    }
    cout << (ok ? "YES\n" : "NO\n");
  }
  return 0;
}
