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

typedef struct{
	double x;
	double y;
	double z;
}Coordinate;

int main(void) {
	
	Coordinate a = {1,5,2};
	Coordinate b = {5,3,1};
	Coordinate c = {2,8,4};
	
	double length_ab,length_co;
	
	length_ab = sqrt((b.x - a.x) * (b.x - a.x) +(b.y - a.y) * (b.y - a.y) + (b.z - a.z) * (b.z - a.z));
	length_co = sqrt(c.x * c.x + c.y * c.y + c.z * c.z);
	
	if(length_ab > length_co){
		printf("%lf\n",length_ab);
	}else{
		printf("%lf\n",length_co);
	}
	
	return 0;
}
