#include #include "testlib.h" using namespace std; using ll=long long; const int MIN_N=2; const int MAX_N=5000; const int MIN_M=0; const int MAX_M=5000; int main(int argc,char** argv){ registerValidation(argc,argv); int N=inf.readInt(MIN_N,MAX_N); inf.readSpace(); int M=inf.readInt(MIN_M,MAX_M); inf.readEoln(); set> s; for(int i=0;i