//Calculation of sides and perimeter of triangle
#include <stdio.h>
#include <math.h>

int main(void){
	double xA, yA, xB, yB, xC, yC, AB, BC, AC, p;
	printf("Coordinates of point A:\n");
	scanf("%lf %lf", &xA, &yA);
	printf("Coordinates of point B:\n");
	scanf("%lf %lf", &xB, &yB);
	printf("Coordinates of point C:\n");
	scanf("%lf %lf", &xC, &yC);
	AB = sqrt((xA - xB) * (xA - xB) + (yA - yB) * (yA - yB));
	BC = sqrt((xB - xC) * (xB - xC) + (yB - yC) * (yB - yC));
	AC = sqrt((xA - xC) * (xA - xC) + (yA - yC) * (yA - yC));
	p = AB + BC + AC;
	printf("AB=%8lg\n", AB);
	printf("BC=%8lg\n", BC);	
	printf("AC=%8lg\n", AC);	
	printf("p =%8lg\n", p);
	return 0;
}