#include #include #include #define nmax 1005 #define mod 666013 #define shift 16 using namespace std; vector H[mod]; vector > sol; int n, m, x, y, encoded; pair decoded; int encode(int x, int y) { return (x< decode(int t) { return make_pair(t>>shift, t-((t>>shift)<>n>>m; for(int i=1; i<=m; i++) { cin>>x>>y; if(x > y) swap(x, y); encoded = encode(x, y); decoded = decode(encoded); int pos = encoded % mod; bool exists = false; for(int j=0; j