#include <stdio.h>
#include <math.h>

int main()
{
    double U, D, H;
    double difference, hypotenuse;
    
    scanf("%lf%lf%lf", &U, &D, &H);
    
    difference = (D - U) / 2;
    hypotenuse = sqrt( (difference * difference) + H*H );
    
    printf("%.2lf\n", (U+D) * H / 2);
    printf("%.2lf\n", U + D + hypotenuse*2);
    
    return 0;
}
