#include #include #include #include #include using namespace std; long A,B; pairgcd(long a,long b){ if(a<0)a=-a; if(b<0)b=-b; if(a>A>>B; double ans=1./4; if(A||B) { pairg=gcd(A,B); if(g.second==0) { for(int i=3;;i++) { long u=2+g.first*(i-2); if(u>20)break; double now=i-1; for(int j=0;j20)break; double now=(i-2)*2+1; for(int j=0;j