#define PROBLEM "https://yukicoder.me/problems/3872" #include using namespace std; template void drop(const T &x){cout<>a>>b; if(mgcd(a,b)!=1) drop(-1); const int MAX = 1e4+10; vector ok(MAX,1); for(int i=0;i