#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:60777216")
using namespace std;
int n, m;
vector<pair<int, int> > v[111111];
bool u[111111];
int Q;
int found = -1, A, B;
void D(int ver, int last = -1) {
  if (u[ver]) return;
  u[ver] = true;
  Q++;
  for (int i(0); i < (v[ver].size()); ++i) {
    if (v[ver][i].second != last && u[v[ver][i].first])
      found = v[ver][i].second, A = ver, B = v[ver][i].first;
    D(v[ver][i].first, v[ver][i].second);
  }
}
vector<pair<int, int> > c;
vector<vector<int> > res;
int num;
vector<int> curr;
bool W[222222];
void dfs(int ver, int last_edge = -1) {
  if (u[ver]) return;
  u[ver] = true;
  if (curr.size() || res.size() == 0 || res[res.size() - 2].back() != ver)
    curr.push_back(ver);
  for (int i(0); i < (v[ver].size()); ++i)
    if (v[ver][i].second != last_edge) {
      int to = v[ver][i].first;
      if (!u[to]) dfs(to, v[ver][i].second), curr.push_back(ver);
      if (c.size() && !W[v[ver][i].second]) {
        W[v[ver][i].second] = 1;
        res.push_back(curr);
        curr.clear();
        num++;
        vector<int> temp;
        temp.push_back(v[ver][i].second);
        temp.push_back(ver);
        temp.push_back(c.back().second);
        c.pop_back();
        res.push_back(temp);
        dfs(temp.back(), -1);
        curr.push_back(ver);
      }
    }
}
int main() {
  cin >> n >> m;
  for (int i(0); i < (m); ++i) {
    int x, y;
    scanf("%d %d", &x, &y);
    v[x].push_back(pair<int, int>(y, i + 1));
    v[y].push_back(pair<int, int>(x, i + 1));
  }
  if (n == 1) {
    puts("YES\n0\n1 1");
    return 0;
  }
  D(1);
  for (int i(1); i < (n + 1); ++i)
    if (!u[i]) D(i);
  c.clear();
  if (v[1].size() == 0) {
    vector<int> t;
    t.push_back(1);
    res.push_back(t);
    if (found == -1) {
      int vv = -1;
      for (int i(1); i < (n + 1); ++i)
        if (vv == -1 || v[i].size() > v[vv].size()) vv = i;
      if (vv != -1 && v[vv].size() > 0)
        found = v[vv][0].second, A = vv, B = v[vv][0].first;
    }
    if (found != -1) {
      for (int i(0); i < (n + 1); ++i)
        for (int j(0); j < (v[i].size()); ++j)
          if (v[i][j].second == found) {
            v[i].erase(v[i].begin() + j);
            break;
          }
      W[found] = true;
      t.clear();
      t.push_back(found);
      num++;
      t.push_back(A);
      t.push_back(1);
      res.push_back(t);
      v[1].push_back(pair<int, int>(A, found));
      v[A].push_back(pair<int, int>(1, found));
      D(A);
    } else {
      puts("NO");
      return 0;
    }
  }
  memset(u, 0, sizeof u);
  D(1);
  for (int i(1); i < (n + 1); ++i)
    if (!u[i]) Q = 0, D(i), c.push_back(pair<int, int>(Q, i));
  sort((c).begin(), (c).end());
  memset(u, 0, sizeof u);
  dfs(1);
  res.push_back(curr);
  bool good = true;
  for (int i(1); i < (n + 1); ++i)
    if (!u[i]) good = false;
  if (!good) {
    puts("NO");
    return 0;
  }
  puts("YES");
  cout << num << endl;
  for (int i(0); i < (res.size()); ++i) {
    if (i % 2) {
    } else
      printf("%d ", res[i].size());
    for (int j(0); j < (res[i].size()); ++j) {
      if (j) printf(" ");
      printf("%d", res[i][j]);
    }
    puts("");
  }
  return 0;
}
