#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int head[maxn], dfn1[maxn], dfn2[maxn], a[maxn], fa[maxn];
struct edge {
  int to, next;
} e[maxn * 2];
int cnt, n, m, tot;
void add(int x, int y) {
  e[cnt].to = y;
  e[cnt].next = head[x];
  head[x] = cnt++;
}
void dfs(int u, int f) {
  fa[u] = f;
  dfn1[u] = ++tot;
  for (int i = head[u]; i != -1; i = e[i].next) {
    int v = e[i].to;
    if (v == f) continue;
    dfs(v, u);
  }
  dfn2[u] = tot;
}
bool cnm(int a, int b) { return dfn1[a] < dfn1[b]; }
int main() {
  cin >> n >> m;
  int x, y, k;
  memset(head, -1, sizeof(head));
  for (int i = 1; i < n; i++) {
    cin >> x >> y;
    add(x, y);
    add(y, x);
  }
  dfs(1, 1);
  for (int i = 1; i <= m; i++) {
    cin >> k;
    for (int j = 1; j <= k; j++) {
      cin >> x;
      a[j] = fa[x];
    }
    sort(a + 1, a + k + 1, cnm);
    int f = 0;
    for (int j = 2; j <= k; j++) {
      if (dfn1[a[j]] >= dfn1[a[j - 1]] && dfn1[a[j]] <= dfn2[a[j - 1]])
        continue;
      else {
        f = 1;
        break;
      }
    }
    if (f)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  return 0;
}
