#include <iostream>
#include <cmath>
#define PI 3.1415926
using namespace std;
double f(double e, double x){
int i = 0;
double p = x;
double s = x;
while (p > e){
p*=(x*x*(2*i + 1)*(2*i + 1))/(2*(i+1)*(2*i + 3));
s+=p;
i++;
}
return s;
}
int main() {
double e; //точность
double x;
cin >> e >> x;
cout << PI/2 - f(e, x) << endl;
cout << acos(x);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CiNkZWZpbmUgUEkgMy4xNDE1OTI2CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgpkb3VibGUgZihkb3VibGUgZSwgZG91YmxlIHgpewoJaW50IGkgPSAwOwoJZG91YmxlIHAgPSB4OwoJZG91YmxlIHMgPSB4OwoJd2hpbGUgKHAgPiBlKXsKCQlwKj0oeCp4KigyKmkgKyAxKSooMippICsgMSkpLygyKihpKzEpKigyKmkgKyAzKSk7CgkJcys9cDsKCQlpKys7Cgl9CglyZXR1cm4gczsKfQoKaW50IG1haW4oKSB7Cglkb3VibGUgZTsgLy/RgtC+0YfQvdC+0YHRgtGMCglkb3VibGUgeDsKCWNpbiA+PiBlID4+IHg7Cgljb3V0IDw8IFBJLzIgLSBmKGUsIHgpIDw8IGVuZGw7Cgljb3V0IDw8IGFjb3MoeCk7CglyZXR1cm4gMDsKfQ==