#include<stdio.h>
#include<math.h>
#define PI 3.141592653589793;

struct cylinder
{
    double r;
    double h;
};
int main()
{
    struct cylinder myCylinder;
       
   // float r, h;
    double volume, surfaceArea, surfaceArea2;
    
    scanf("%lf", &myCylinder.r);
    scanf("%lf", &myCylinder.h);
    //if (r < -100 || r > 100 || h < -100 || h > 100)
    if (myCylinder.r < 0 || myCylinder.h < 0)
    {
        printf("Invalid input");
       // return 0;
    }
    /*else if (r < -100 || r > 100 || h < -100 || h > 100)
    {
         printf("Invalid input");
    }*/
    else
    {
        surfaceArea = 2 * PI * (myCylinder);
        surfaceArea2 = surfaceArea * (myCylinder.r + myCylinder.h);
        volume = (double)PI * (double)myCylinder.r * (double)myCylinder.r * (double)myCylinder.h;
        printf("Surface Area: %.2lf\n", surfaceArea2);
        printf("Volume: %.2lf\n", volume);
    }
    return 0;
}