#include #include #include using ldouble = long double; const ldouble PI = std::acos(-1L); void solve() { ldouble r, R; std::cin >> r >> R; ldouble t = PI * 2 - std::acos(1 - (2 * r * r) / (R * R)); ldouble area = ((R + r) * (R + r) - (R - r) * (R - r)) * PI * t / (PI * 2) + r * r * PI; std::cout << std::fixed << std::setprecision(10) << t << std::endl << area << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }