#include #include #include #include #define x first #define y second #define now q.front() #define P pair #include #include using namespace std; ifstream f(".in"); ofstream g(".out"); int i,j,m,a,b,c,r,maxi,divi,l=1,z,v[5001][4]; int main() { cin>>a; cin>>b; cout<