#include"testlib.h" #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const long long MIN_N = 2; const long long MAX_N = 5000; const long long MIN_M = 1; const long long MAX_M = 5000; const long long MIN_a = 0; const long long MAX_a = 1000000000; void validate(){ long long N = inf.readLong(MIN_N,MAX_N); inf.readSpace(); long long M = inf.readLong(1,N); inf.readEoln(); set P; long long p; for (long long i=0;i