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