LL gcd(LL a,LL b,LL &x,LL &y){ if(b==0)return x=1,y=0,a; else ex=gcd(b,a%b,y,x); y=y-(a/b)*x; return ex; }