#include #include using namespace std; int gcd(int a,int b) { while(b) { int t=a%b; a=b; b=t; } return a; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int A,B; cin>>A>>B; int L=A*A+B*B; if(A==B) { for(int i=0;iB) { int g=gcd(A,B); int sx=0,sy=0; for(int t=0;t