#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
int n, m, i, j, u, v, t, k, flag, ls, d[200003], p[200003];
int y, st[200003], en[200003], a[200003], visited[200003];
vector<long long> g[200003];
void dfs(int x, int par, int depth) {
  visited[x] = 1;
  p[x] = par;
  d[x] = depth;
  st[x] = t++;
  for (auto it : g[x]) {
    if (!visited[it]) dfs(it, x, depth + 1);
  }
  en[x] = t++;
}
long long add(long long a, long long b) {
  return ((a % MOD) + (b % MOD)) % MOD;
}
long long mul(long long a, long long b) {
  return ((a % MOD) * (b % MOD)) % MOD;
}
long long sub(long long a, long long b) {
  return ((a % MOD) - (b % MOD) + MOD) % MOD;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int x;
  cin >> n >> m;
  for (i = 0; i < n - 1; i++) {
    cin >> u >> v;
    u--;
    v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  t = 0;
  dfs(0, -1, 0);
  for (i = 0; i < m; i++) {
    cin >> k;
    flag = 1;
    ls = 0;
    for (j = 0; j < k; j++) {
      cin >> a[j];
      a[j]--;
      if (d[a[j]] > d[ls]) ls = a[j];
    }
    for (j = 0; j < k; j++) {
      if (a[j] != ls && a[j] != 0) a[j] = p[a[j]];
    }
    for (j = 0; j < k; j++) {
      x = a[j];
      if (x == ls) continue;
      if (!(st[x] <= st[ls] && en[ls] <= en[x])) {
        flag = 0;
        break;
      }
    }
    if (flag)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
