#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; cout << "YES\n" << 2 * m << "\n"; while (m--) { int a, b; cin >> a >> b; vector<int> f, s; for (int i = 1; i <= n; i++) { if (i != a && i != b) f.push_back(i); } f.push_back(a), f.push_back(b); s = f; reverse(s.begin(), s.end()); swap(s[0], s[1]); for (int i: f) cout << i << " "; cout << "\n"; for (int i: s) cout << i << " "; cout << "\n"; } }