#include <bits/stdc++.h>
using namespace std;
vector<int> v[200005];
int anc[200005];
pair<int, int> t[200005];
int timer = 0;
void dfs(int idx, int an) {
  anc[idx] = an;
  t[idx].first = timer;
  timer++;
  for (int i = 0; i < v[idx].size(); i++) {
    if (v[idx][i] != an) {
      dfs(v[idx][i], idx);
    }
  }
  t[idx].second = timer;
  timer++;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, q;
  cin >> n >> q;
  int x, y;
  for (int i = 0; i < n - 1; i++) {
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  dfs(1, 1);
  for (int i = 0; i < q; i++) {
    set<int> s;
    int m;
    cin >> m;
    for (int j = 0; j < m; j++) {
      cin >> x;
      s.insert(anc[x]);
    }
    int cu = -1;
    bool b = true;
    set<int>::iterator it = s.begin();
    for (it; it != s.end() && b; it++) {
      if (cu == -1)
        cu = *it;
      else {
        int cu1 = *it;
        if (t[cu].first >= t[cu1].first && t[cu].second <= t[cu1].second) {
          cu = cu;
        } else if (t[cu1].first >= t[cu].first &&
                   t[cu1].second <= t[cu].second) {
          cu = cu1;
        } else {
          b = false;
        }
      }
    }
    if (b)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
