#include #define M_PI 3.14159265358979323846 // pi using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector VI; typedef pair P; typedef tuple t3; #define rep(a,n) for(int a = 0;a < n;a++) #define repi(a,b,n) for(int a = b;a < n;a++) const ull mod = 1000000007; int main(void) { double r, R; cin >> r >> R; double theta = asin(r / R); double t = M_PI * 2 - theta * 2; double area = 4 * R * r * (M_PI / (2*M_PI) * t) + M_PI * r * r; cout << std::fixed << std::setprecision(10); cout << t << endl; cout << area << endl; return 0; }