#include <iostream>
#include <cmath>
using namespace std;
double f(double x1, double y1, double x2, double y2) {
return sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1));
}
double f(double R, double r, double h) {
return (M_PI * h / 3.0) * (R*R + R*r + r*r);
}
int main() {
cout << f(1, 1, 4, 5) << endl;
cout << f(5, 3, 10) << endl;
return 0;
}