#include <iostream> #include <vector> int main() { int n, m; std::cin >> n >> m; std::cout << "YES\n"; std::cout << 2 * m << '\n'; for (int idx = 0; idx < m; ++idx) { int a, b; std::cin >> a >> b; std::cout << a << ' ' << b << ' '; for (int i = 1; i <= n; ++i) { if (i == a || i == b) continue; std::cout << i << ' '; } std::cout << '\n'; for (int i = n; i >= 1; --i) { if (i == a || i == b) continue; std::cout << i << ' '; } std::cout << a << ' ' << b << ' '; std::cout << '\n'; } }