#include <iostream>
#include <math.h>
using namespace std;
int main(){
double xA, yA, xB, yB, xC, yC; int h, S, AB, BC, AC;
cin>>xA>>yA>>xB>>yB>>xC>>yC;
AB = sqrt((xB-xA)*(xB-xA)+(yB-yA)*(yB-yA));
BC = sqrt((xC-xB)*(xC-xB)+(yC-yB)*(yC-yB));
AC = sqrt((xA-xC)*(xA-xC)+(yA-yC)*(yA-yC));
{
if((AB>BC+AC)&&(BC>AB+AC)&&(AC>AB+BC))
{
cout << ("Treygolnik ne syshestvyet");
}
else
{
S = fabs((xB-xA)*(yC-yA)-(xC-xA)*(yB-yA))/2.0;
h = (2*S)/ BC;
cout << BC << " " << h;
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKXsKICAgIGRvdWJsZSB4QSwgeUEsIHhCLCB5QiwgeEMsIHlDOyBpbnQgaCwgUywgQUIsIEJDLCBBQzsKICAgIGNpbj4+eEE+PnlBPj54Qj4+eUI+PnhDPj55QzsKICAgIEFCID0gc3FydCgoeEIteEEpKih4Qi14QSkrKHlCLXlBKSooeUIteUEpKTsKCUJDID0gc3FydCgoeEMteEIpKih4Qy14QikrKHlDLXlCKSooeUMteUIpKTsKCUFDID0gc3FydCgoeEEteEMpKih4QS14QykrKHlBLXlDKSooeUEteUMpKTsKCXsKCQlpZigoQUI+QkMrQUMpJiYoQkM+QUIrQUMpJiYoQUM+QUIrQkMpKQoJCXsKCQkJY291dCA8PCAoIlRyZXlnb2xuaWsgbmUgc3lzaGVzdHZ5ZXQiKTsKCQl9CgkJZWxzZQoJCXsKCQkJUyA9IGZhYnMoKHhCLXhBKSooeUMteUEpLSh4Qy14QSkqKHlCLXlBKSkvMi4wOyAKIAkJCWggPSAoMipTKS8gQkM7CgkgCQljb3V0IDw8IEJDIDw8ICIgIiA8PCBoOwoJIAl9Cgl9CglyZXR1cm4gMDsKfQo=