#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
using u64 = unsigned long long;
struct debug {
  ~debug() { cerr << endl; }
  template <class c>
  debug& operator<<(c x) {
    cerr << x;
    return *this;
  }
  template <class c, class d>
  debug& operator<<(pair<c, d> x) {
    *this << "(" << x.first << ", " << x.second << ")";
    return *this;
  }
  template <class c>
  debug& operator<<(vector<c> x) {
    *this << "[";
    int f = 0;
    for (auto it : x) {
      *this << (f ? ", " : "");
      *this << it;
      f = 1;
    }
    *this << "]";
    return *this;
  }
};
vector<int> G[300000];
int par[300000];
int vis[300000];
int h[300000];
int ancestor[300000][30];
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  queue<int> Q;
  Q.push(1);
  h[1] = 1;
  while (!Q.empty()) {
    int cur = Q.front();
    Q.pop();
    for (int to : G[cur]) {
      if (h[to] == 0) {
        h[to] = h[cur] + 1;
        par[to] = cur;
        Q.push(to);
        ancestor[to][0] = cur;
        for (int i = 1; i < 30; i++) {
          int p = ancestor[to][i - 1];
          if (p == 0) break;
          ancestor[to][i] = ancestor[p][i - 1];
        }
      }
    }
  }
  while (q--) {
    int k;
    vector<int> v;
    scanf("%d", &k);
    for (int i = 0; i < k; i++) {
      int u;
      scanf("%d", &u);
      v.push_back(u);
      v.push_back(par[u]);
    }
    sort(v.begin(), v.end(), [&](int a, int b) { return h[a] < h[b]; });
    int cur = v.back();
    vis[cur] = 1;
    for (int i = 2 * k - 1; i > 0; i--) {
      int dif = max(h[v[i]] - h[v[i - 1]], 0);
      for (int j = 0; j < 30; j++) {
        if (dif & (1 << j)) {
          cur = ancestor[cur][j];
          vis[cur] = 1;
          if (cur == 0) break;
        }
      }
    }
    int ok = 1;
    for (int i = 0; i < 2 * k; i++) {
      if (vis[v[i]] == 1 || vis[par[v[i]]] == 1) {
      } else {
        ok = 0;
      }
    }
    if (ok)
      puts("YES");
    else
      puts("NO");
    cur = v.back();
    vis[cur] = 0;
    for (int i = 2 * k - 1; i > 0; i--) {
      int dif = max(h[v[i]] - h[v[i - 1]], 0);
      for (int j = 0; j < 30; j++) {
        if (dif & (1 << j)) {
          cur = ancestor[cur][j];
          if (cur == 0) break;
          vis[cur] = 0;
        }
      }
    }
  }
}
