#include <bits/stdc++.h>
using namespace std;

int main() {
    double r, R, t;
    cin >> r >> R;
    t = 2.0 * M_PI - 2.0 * asin(r / R);
    cout << setprecision(17);
    cout << t << endl;
    cout << M_PI * r * r + 2.0 * r * R * t << endl;
}