#include using namespace std; using Int = long long; const char newl = '\n'; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a void drop(const T &x){cout< vector read(size_t n){ vector ts(n); for(size_t i=0;i>ts[i]; return ts; } //INSERT ABOVE HERE using P = pair; map memo; signed solve(){ Int x,y; cin>>x>>y; if(x>y) swap(x,y); if(memo.count(P(x,y))){ cout< cand; for(Int i=1;i*i<=x;i++){ if(x%i) continue; cand.emplace_back(i); if(i*i!=x) cand.emplace_back(x/i); } // 1 < a for(Int c:cand){ Int a=x/c-1; Int b=c; if(1 cand; for(Int i=1;i*i<=d;i++){ if(d%i) continue; cand.emplace_back(i); if(i*i!=d) cand.emplace_back(d/i); } for(Int t:cand){ Int a=t+1; Int s=d/t; Int b=(x-s)/(a+1); Int c=s+b; if(0>T; while(T--) solve(); return 0; }