#include "bits/stdc++.h" using namespace std; void solve() { int n, m; cin >> n >> m; vector<vector<int>> g(n); vector<vector<int>> ops; vector<pair<int, int>> edg(m); for (int i = 0; i < m; ++i) { int a, b; cin >> a >> b; a--;b--; vector<int> el(n, 1); el[a] = 0; el[b] = 0; vector<int> t; for (int j = 0; j < n; ++j) { if (el[j]) t.push_back(j); } vector<int> t1 = t, t2 = t; t1.push_back(a); t1.push_back(b); t2.push_back(b); t2.push_back(a); reverse(t2.begin(), t2.end()); ops.push_back(t1); ops.push_back(t2); } cout << "YES\n"; cout << ops.size() << '\n'; for (auto i : ops) { for (auto j : i) cout << j + 1 << ' '; cout << '\n'; } } signed main() { ios::sync_with_stdio(0); cin.tie(0);cout.tie(0); int t = 1; //cin >> t; while (t--) solve(); }