#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i=a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() #define fo(i, b) for(int i=0; i < (b); ++i) #define F first #define S second #define MP make_pair typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int, int> pii; typedef pair<ll, ll> pll; int n,m,a,b; signed main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); cin >> n >> m; printf("YES\n%d\n", 2*m); fo(i,m) { cin >> a >> b; a--, b--; printf("%d %d", a+1, b+1); fo(i,n) if(i!=a) if(i!=b) printf(" %d", i+1); printf("\n"); for(int i=n;i-->0;) if(i!=a) if(i!=b) printf("%d ", i+1); printf("%d %d", a+1, b+1); printf("\n"); } }