#include <stdio.h>
#include <stdlib.h>
#include <math.h>
unsigned long long int Reduce(unsigned long long int X ,unsigned long long int Y)
{
unsigned long long int Exp,Len;
Len=X>Y?X:Y;
Exp
=(unsigned long long int)pow(2,ceill
(log2
(Len
))); if (X==1&&Y==1)
{
return 1;
}
else if (X>Exp/2&&Y>Exp/2)
{
return (Exp*Exp/4)+Reduce(X-Exp/2,Y-Exp/2);
}
else if (X>Exp/2&&Y<=Exp/2)
{
return 2*(Exp*Exp/4)+Reduce(X-Exp/2,Y);
}
else if (X<=Exp/2&&Y>Exp/2)
{
return 3*(Exp*Exp/4)+Reduce(X,Y-Exp/2);
}
}
int main()
{
unsigned long long int I,J;
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPG1hdGguaD4KdW5zaWduZWQgbG9uZyBsb25nIGludCBSZWR1Y2UodW5zaWduZWQgbG9uZyBsb25nIGludCBYICx1bnNpZ25lZCBsb25nIGxvbmcgaW50IFkpCnsKICAgIHVuc2lnbmVkIGxvbmcgbG9uZyBpbnQgRXhwLExlbjsKICAgIExlbj1YPlk/WDpZOwogICAgRXhwPSh1bnNpZ25lZCBsb25nIGxvbmcgaW50KXBvdygyLGNlaWxsKGxvZzIoTGVuKSkpOwogICAgaWYgICAgICAoWD09MSYmWT09MSkKICAgIHsKICAgICAgICByZXR1cm4gMTsKICAgIH0KICAgIGVsc2UgaWYgKFg+RXhwLzImJlk+RXhwLzIpCiAgICB7CiAgICAgICAgcmV0dXJuIChFeHAqRXhwLzQpK1JlZHVjZShYLUV4cC8yLFktRXhwLzIpOwogICAgfQogICAgZWxzZSBpZiAoWD5FeHAvMiYmWTw9RXhwLzIpCiAgICB7CiAgICAgICAgcmV0dXJuIDIqKEV4cCpFeHAvNCkrUmVkdWNlKFgtRXhwLzIsWSk7CiAgICB9CiAgICBlbHNlIGlmIChYPD1FeHAvMiYmWT5FeHAvMikKICAgIHsKICAgICAgICByZXR1cm4gMyooRXhwKkV4cC80KStSZWR1Y2UoWCxZLUV4cC8yKTsKICAgIH0KfQppbnQgbWFpbigpCnsKICAgIHVuc2lnbmVkIGxvbmcgbG9uZyBpbnQgSSxKOwogICAgc2NhbmYoIiVsbHUlbGx1IiwmSSwmSik7CiAgICBwcmludGYoIiVsbHVcbiIsUmVkdWNlKEosSSkpOwogICAgcmV0dXJuIDA7Cn0K