#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n>>k; vector v(n); iota(v.begin(),v.end(),0); for(Int i=0;i>x>>y; x--;y--; swap(v[x],v[y]); } Int ans=1; vector used(n,0); for(Int i=0;i