#include <iostream>
#include <math.h>
#include <iomanip>
using namespace std;
int main () {
double a,b;
cin >> a >> b;
cout << fixed << setprecision(2) << sqrt(a*a+b*b) << " " << a*b/2 << endl ;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgojaW5jbHVkZSA8aW9tYW5pcD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluICgpIHsKICAgIGRvdWJsZSBhLGI7CiAgICBjaW4gPj4gYSA+PiBiOwogICAgY291dCA8PCBmaXhlZCA8PCBzZXRwcmVjaXNpb24oMikgPDwgc3FydChhKmErYipiKSA8PCAiICIgPDwgYSpiLzIgPDwgZW5kbCA7CiAgICByZXR1cm4gMDsKfQ==