int main() {
	int n;
	cin >> n;
	int point[10][3] = {0}; // to store the position of the points
	float distance[45][3] = {0}; // to store the distances
	for(int i = 0; i < n; i++)
		for(int j = 0; j < 3; j++)
			cin >> point[i][j];
	int count = 0; // to calculate the number of the distances
	for(int i = 0; i < n - 1; i++)
		for(int j = i + 1; j < n; j++) {   // to calculate the distances and store the name of the points
			distance[count][0] = i;
			distance[count][1] = j;
			distance[count][2] = sqrt((float)(point[i][0] - point[j][0])*(point[i][0] - point[j][0]) + (point[i][1] - point[j][1])*(point[i][1] - point[j][1]) +(point[i][2] - point[j][2])*(point[i][2] - point[j][2]));
			count++;
		}
	float temp = 0;
	for(int i = 0; i < count - 1; i++) // bubble sort
		for(int j = i + 1; j < count ; j++) {
			if(distance[i][2] < distance[j][2]) {
				temp = distance[i][0];
			    distance[i][0] = distance[j][0];
				distance[j][0] = temp;
				temp = distance[i][1];
			    distance[i][1] = distance[j][1];
				distance[j][1] = temp;
				temp = distance[i][2];
			    distance[i][2] = distance[j][2];
				distance[j][2] = temp;
			}
			else if(distance[i][2] == distance[j][2]) {
				if(distance[i][0] > distance[j][0]) {
					temp = distance[i][0];
			        distance[i][0] = distance[j][0];
				    distance[j][0] = temp;
				    temp = distance[i][1];
			        distance[i][1] = distance[j][1];
				    distance[j][1] = temp;
				    temp = distance[i][2];
			        distance[i][2] = distance[j][2];
				    distance[j][2] = temp;
				}
				if(distance[i][1] > distance[j][1]) {
					temp = distance[i][0];
			        distance[i][0] = distance[j][0];
				    distance[j][0] = temp;
				    temp = distance[i][1];
			        distance[i][1] = distance[j][1];
				    distance[j][1] = temp;
				    temp = distance[i][2];
			        distance[i][2] = distance[j][2];
				    distance[j][2] = temp;
				}
			}
		}
	for(int i = 0; i < count; i++) {
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n", point[(int)distance[i][0]][0],point[(int)distance[i][0]][1],point[(int)distance[i][0]][2],point[(int)distance[i][1]][0],point[(int)distance[i][1]][1],point[(int)distance[i][1]][2],distance[i][2]);

	}

	return 0;
}


int main(){
	int n;
	struct point{
		int x,y,z,i;
	}points[10];
		struct jieguo{
		struct point pointqian;
		struct point pointhou;
		double juliss;
	}e,jieguos[45];
	scanf("%d",&n);
	int i=0;
	for(i=0;i<n;i++){
		scanf("%d%d%d",&points[i].x,&points[i].y,&points[i].z);
	}
	int m=0,k=0;
	i=0;
	for(m=0;m<n;m++){
		for(k=m+1;k<n;k++){
			jieguos[i].pointqian=points[m];
			jieguos[i].pointhou=points[k];
            jieguos[i].juliss=sqrt((jieguos[i].pointqian.x-jieguos[i].pointhou.x)*(jieguos[i].pointqian.x-jieguos[i].pointhou.x)+(jieguos[i].pointqian.y-jieguos[i].pointhou.y)*(jieguos[i].pointqian.y-jieguos[i].pointhou.y)+(jieguos[i].pointqian.z-jieguos[i].pointhou.z)*(jieguos[i].pointqian.z-jieguos[i].pointhou.z));
			i++;
		}
	}
	for(k=1;k<(n*(n-1)/2);k++){
		for(i=0;i<(n*(n-1)/2)-k;i++){
			if(jieguos[i].juliss<jieguos[i+1].juliss){
				e=jieguos[i+1];
				jieguos[i+1]=jieguos[i];
				jieguos[i]=e;
			}
		}
	}
	for(i=0;i<(n*(n-1)/2);i++){
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",jieguos[i].pointqian.x,jieguos[i].pointqian.y,jieguos[i].pointqian.z,jieguos[i].pointhou.x,jieguos[i].pointhou.y,jieguos[i].pointhou.z,jieguos[i].juliss);
	}
	return 0;
}


struct point
{
    double x;
	double y;
	double z;
};

struct points
{
	double x1;
	double y1;
	double z1;
	double x2;
	double y2;
	double z2;
	double len;
};

double length(struct point a,struct point b)
{
	return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)+(a.z-b.z)*(a.z-b.z));
}

void main()
{
	int m,n,i,j,k;
	struct point p[11];
	struct points ps[101];
	struct points pst;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%lf%lf%lf",&p[i].x,&p[i].y,&p[i].z);

	k=0;
	for(i=0;i<n;i++)//p1
	{
		for(j=i+1;j<n;j++)//p2
		{
			if(i==j)
				continue;
            ps[k].x1=p[i].x;
			ps[k].y1=p[i].y;
			ps[k].z1=p[i].z;
			ps[k].x2=p[j].x;
			ps[k].y2=p[j].y;
			ps[k].z2=p[j].z;
            ps[k].len=length(p[i],p[j]);
			k++;
		}
	}

    m=n*(n-1)/2;
    for(i=1;i<m;i++)
	{
		for(j=0;j<m-i;j++)
			if(ps[j].len<ps[j+1].len)
			{
                pst=ps[j];
				ps[j]=ps[j+1];
				ps[j+1]=pst;
			}
	}

    for(i=0;i<m;i++)
        printf("(%g,%g,%g)-(%g,%g,%g)=%.2lf\n",ps[i].x1,ps[i].y1,ps[i].z1,ps[i].x2,ps[i].y2,ps[i].z2,ps[i].len);

}


struct point {  int x;
	   int y;
	   int z; };
double dis(struct point b,struct point c);
int main()
{
	int n,a,i=0,j=0,k;
	struct point str[10];
	struct thr{
		float d;
		int e;
		int f; };
		struct thr temp={0};
		struct thr str1[10000]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d%d%d",&str[i].x,&str[i].y,&str[i].z);
	i=0;
	for(j=0;j<n-1;j++)
	{    k=j+1;
		for(k=j+1;k<n;k++)
		{    str1[i].d=dis(str[j],str[k]);
		    str1[i].e=j;
			str1[i].f=k;
			i++;
		}
	}
	a=i;
	j=0;
	k=0;
	for(j=0;j<a-1;j++)
	{     k=0;
		for(k=0;k<a-j;k++)
		{
			if(str1[k].d<str1[k+1].d)
			{temp=str1[k];
			     str1[k]=str1[k+1];
				 str1[k+1]=temp;
			}
		}
	}
	i=0;
	for(i=0;i<a;i++)
	{
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f",str[str1[i].e].x,str[str1[i].e].y,str[str1[i].e].z,str[str1[i].f].x,
	str[str1[i].f].y,str[str1[i].f].z,str1[i].d);
		printf("\n");
	}
	return 0;
}

double dis(struct point b,struct point c)
{
   return sqrt(pow((b.x-c.x),2)+pow((b.y-c.y),2)+pow((b.z-c.z),2));
}


struct d
{
	int x;
	int y;
	int z;
};
struct p
{
	struct d s1,s2;
	float res;
};
float f(struct d s1,struct d s2)
{
	double sum=0;
	sum=(s1.x-s2.x)*(s1.x-s2.x)+(s1.y-s2.y)*(s1.y-s2.y)+(s1.z-s2.z)*(s1.z-s2.z);
	return(sqrt(sum));
}
void change(struct p pri[300],int n)
{
	int i,j;
	struct p temp;
	for(i=0;i<n-1;i++)
	{
		for(j=0;j<n-1-i;j++)
		{
			if(pri[j].res<pri[j+1].res)
			{
				temp.s1.x=pri[j].s1.x;
                temp.s1.y=pri[j].s1.y;
                temp.s1.z=pri[j].s1.z;
                temp.s2.x=pri[j].s2.x;
                temp.s2.y=pri[j].s2.y;
                temp.s2.z=pri[j].s2.z;
				temp.res=pri[j].res;
                pri[j].s1.x=pri[j+1].s1.x;
                pri[j].s1.y=pri[j+1].s1.y;
                pri[j].s1.z=pri[j+1].s1.z;
                pri[j].s2.x=pri[j+1].s2.x;
                pri[j].s2.y=pri[j+1].s2.y;
                pri[j].s2.z=pri[j+1].s2.z;
				pri[j].res=pri[j+1].res;
                pri[j+1].s1.x=temp.s1.x;
                pri[j+1].s1.y=temp.s1.y;
                pri[j+1].s1.z=temp.s1.z;
                pri[j+1].s2.x=temp.s2.x;
                pri[j+1].s2.y=temp.s2.y;
                pri[j+1].s2.z=temp.s2.z;
			    pri[j+1].res=temp.res;
			}
		}
	}
}
void main()
{
	int n;
	int i,j;
	int k=0,h=0;
	float res[100];
	struct d s[100];
	struct p pri[300];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d%d%d",&s[i].x,&s[i].y,&s[i].z);
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			res[k]=f(s[i],s[j]);
			pri[h].s1.x=s[i].x;
			pri[h].s1.y=s[i].y;
			pri[h].s1.z=s[i].z;
            pri[h].s2.x=s[j].x;
			pri[h].s2.y=s[j].y;
			pri[h].s2.z=s[j].z;
			pri[h].res=res[k];
			h++;
			k++;
		}
	}
	change(pri,h);
	for(i=0;i<h;i++)
		//(0,0,0)-(1,1,1)=1.73//
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",pri[i].s1.x,pri[i].s1.y,pri[i].s1.z,pri[i].s2.x,pri[i].s2.y,pri[i].s2.z,pri[i].res);
}


struct location
{
	int x;
	int y;
	int z;
} point[10], t;
struct dis
{
	int point1;
	int point2;
	double s;
	int num;
} len[45], temp;
int main()
{
	int n, i, j,count = 0, p;
	double t;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >> point[i].x >> point[i].y
			>> point[i].z;
	}
	for (i = 0; i < n - 1; i++)
		for (j = i + 1; j < n; j++)
		{
			len[count].point1 = i;
			len[count].point2 = j;
			t = pow ((double) (point[i].x - point[j].x), 2) +
				pow ((double) (point[i].y - point[j].y), 2) +
				pow ((double) (point[i].z - point[j].z), 2);
			len[count].s = sqrt (t);
			len[count].num = count;
			++count;
		}
	for (i = 0; i < count - 1; i++)
	{
		p = i;
		for (j = i +1; j < count; j++)
		{
			if (len[p].s < len[j].s)
				p = j;
			else if (len[p].s == len[j].s
				     && len[p].num > len[j].num)
				p = j;
		}
		{
			temp = len[p];
			len[p] = len[i];
			len[i] = temp;
		}
	}
	for (i = 0; i < count; i++)
	{
		cout << "(" << point[len[i].point1].x
			 << "," << point[len[i].point1].y
			 << "," << point[len[i].point1].z
			 << ")" << "-"
			 << "(" << point[len[i].point2].x
			 << "," << point[len[i].point2].y
			 << "," << point[len[i].point2].z
			 << ")" << "=" << fixed << setprecision(2)
			 << len[i].s << endl;
	}
	return 0;
}


struct node {
       int x,y,z;
}p[10];
struct edge{
       int node1,node2;
       double dis;
}t[100];
double dist(int a,int b)
{
       return sqrt((p[a].x-p[b].x)*(p[a].x-p[b].x)+(p[a].y-p[b].y)*(p[a].y-p[b].y)+(p[a].z-p[b].z)*(p[a].z-p[b].z));
}
int judge(int x,int y)
{
     if (t[x].node1<t[y].node1 || (t[x].node1==t[y].node1 && t[x].node2<t[y].node2))
		 return 0;
     else return 1;
}
int main()
{
    int n,l=0,a,b,i,j;
    scanf("%d",&n);
    for (i=0;i<n;i++) scanf("%d%d%d",&p[i].x,&p[i].y,&p[i].z);
    for (i=0;i<n;i++)
	{
        for (j=i+1;j<n;j++)
		{
            l++;
			t[l].dis=dist(i,j);
			t[l].node1=i;
			t[l].node2=j;
            }
    }
    for (i=1;i<=l;i++)
	{
        for (j=i+1;j<=l;j++)
		{
            if (t[i].dis<t[j].dis || (t[i].dis==t[j].dis && judge(i,j)))
			{
               t[56]=t[i];
			   t[i]=t[j];
			   t[j]=t[56];
            }
        }
    }
    for (i=1;i<=l;i++)
	{
         a=t[i].node1;
		b=t[i].node2;
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",p[a].x,p[a].y,p[a].z,p[b].x,p[b].y,p[b].z,t[i].dis);
    }
    return 0;
}


struct point{
	double x;
	double y;
	double z;
};
struct range{
    double a[3];
    double b[3];
    double x;
};
int main(){
struct point points[10];
struct range ranges[200];
int n;
cin>>n;
for(int i=0;i<n;i++)
cin>>points[i].x>>points[i].y>>points[i].z;
int k=0;
for(int i=0;i<n;i++)
for(int j=i+1;j<n;j++){
ranges[k].x=sqrt(pow((points[i].x-points[j].x),2)+pow((points[i].y-points[j].y),2)+pow((points[i].z-points[j].z),2));
ranges[k].a[0]=points[i].x;ranges[k].a[1]=points[i].y;ranges[k].a[2]=points[i].z;
ranges[k].b[0]=points[j].x;ranges[k].b[1]=points[j].y;ranges[k].b[2]=points[j].z;
k++;}
struct range temp;
for(int i=0;i<=k;i++)
for(int j=0;j<=k-i;j++)
if(ranges[j].x<ranges[j+1].x){
temp=ranges[j];
ranges[j]=ranges[j+1];
ranges[j+1]=temp;
}
for(int i=0;i<k;i++)
cout<<fixed<<setprecision(0)<<'('<<ranges[i].a[0]<<','<<ranges[i].a[1]<<','<<ranges[i].a[2]<<')'<<'-'<<'('<<ranges[i].b[0]<<','<<ranges[i].b[1]<<','<<ranges[i].b[2]<<')'<<'='<<fixed<<setprecision(2)<<ranges[i].x<<endl;

}


struct point
{
	double x;
	double y;
	double z;
};
struct dianju
{
	double d;
	struct point p1;
	struct point p2;
};
void main()
{

	double julijisuan(struct point p1,struct point p2);
	int n,i,j,k;
	struct point p[m];
	struct dianju D[m*(m-1)/2];
	struct dianju a;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf%lf%lf",&p[i].x,&p[i].y,&p[i].z);
	}
	for(i=0,k=0;i<n-1;i++)
	{

		for(j=i;j<n-1;j++,k++)
		{
			D[k].p1=p[i];
			D[k].p2=p[j+1];
			D[k].d=julijisuan(D[k].p1,D[k].p2);
		}
	}
	for(i=0;i<n*(n-1)/2;i++)
	{
		for(j=0;j<n*(n-1)/2-1;j++)
		{
			if(D[j].d<D[j+1].d)
			{
				a=D[j];
				D[j]=D[j+1];
				D[j+1]=a;
			}
		}
	}
	for(i=0;i<n*(n-1)/2;i++)
	{
		printf("(%.0lf,%.0lf,%.0lf)-(%.0lf,%.0lf,%.0lf)=%.2lf\n",D[i].p1.x,D[i].p1.y,D[i].p1.z,D[i].p2.x,D[i].p2.y,D[i].p2.z,D[i].d);
	}

}

double julijisuan(struct point p1,struct point p2)
{
	return(sqrt((p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y)+(p1.z-p2.z)*(p1.z-p2.z)));
}


typedef struct
{
	int x,y,z;
} Point;
typedef struct
{
	double len;
	int pt1,pt2;
} Distance;
double CalDis(Point pt1,Point pt2)
{
	return sqrt((double)(pt1.x-pt2.x)*(pt1.x-pt2.x)+(pt1.y-pt2.y)*(pt1.y-pt2.y)+(pt1.z-pt2.z)*(pt1.z-pt2.z));
}
int cmp( const void *a ,const void *b)
{
	if((*(Distance *)a).len != (*(Distance *)b).len)
		return (*(Distance *)a).len > (*(Distance *)b).len ? -1 : 1;
		//return ((Distance *)b)->len - ((Distance *)a)->len;
	//return (*(Distance *)a).pt1 > (*(Distance *)b).pt1 ? 1 : -1;
	if(((Distance *)a)->pt1 != ((Distance *)b)->pt1)
		return ((Distance *)a)->pt1 - ((Distance *)b)->pt1;
	return ((Distance *)a)->pt2 - ((Distance *)b)->pt2;
}
/*int cmp( const void *a ,const void *b)
{
	if((*(Distance *)b).len != (*(Distance *)a).len)
		return (*(Distance *)b).len > (*(Distance *)a).len ? 1 : -1;
	else
		return (*(Distance *)a).pt1 > (*(Distance *)b).pt1 ? 1 : -1;
}*/
Distance ds[N];
int main()
{
	int n,count=0,i,j;
	Point pts[10];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d %d %d",&pts[i].x,&pts[i].y,&pts[i].z);
	for(i=0;i<n;i++)
		for(j=i+1;j<n;j++)
		{
			ds[count].len=CalDis(pts[i],pts[j]);
			ds[count].pt1=i;
			ds[count++].pt2=j;
		}
	qsort(ds,count,sizeof(ds[0]),cmp);
	for(i=0;i<count;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",pts[ds[i].pt1].x,pts[ds[i].pt1].y,
		pts[ds[i].pt1].z,pts[ds[i].pt2].x,pts[ds[i].pt2].y,pts[ds[i].pt2].z,ds[i].len);
	return 0;
}


int main()
{
	struct
	{
		double x;
		double y;
		double z;
	}point[15];
	struct stru
	{
		int p,q;
		double distance;
	}dis[50],temp;
	int n,i,j;
	cin>>n;
	for(i=0;i<n;i++)
		cin>>point[i].x>>point[i].y>>point[i].z;
	int k=0;
	for(i=0;i<n-1;i++)
	   for(j=i+1;j<n;j++)
	   {
			dis[k].p=i;dis[k].q=j;
			double a,b,c;
			a=(point[i].x-point[j].x)*(point[i].x-point[j].x);
			b=(point[i].y-point[j].y)*(point[i].y-point[j].y);
			c=(point[i].z-point[j].z)*(point[i].z-point[j].z);
			dis[k].distance=sqrt(a+b+c);
			k=k+1;
	   }
	for(i=1;i<=k;i++)
	    for(j=0;j<k-i;j++)
	    {
			if(dis[j].distance<dis[j+1].distance)
			{
			    temp=dis[j];dis[j]=dis[j+1];dis[j+1]=temp;
			}
		}
	for(i=0;i<=k-1;i++)
	{
	    cout<<'('<<point[dis[i].p].x<<','<<point[dis[i].p].y<<','<<point[dis[i].p].z<<')';
	    cout<<"-("<<point[dis[i].q].x<<','<<point[dis[i].q].y<<','<<point[dis[i].q].z<<")=";
		printf("%.2f\n",dis[i].distance);
	}
	return 0;
}


	struct dis
	{
		int place_p1;
		int p1[3];
		int place_p2;
		int p2[3];
		float distance;
	}p[45];
void main()
{
void exchange(struct dis *pa,struct dis *pb);

	int n,i,j,point[10][3],count=0;
    struct dis *po=p;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d%d%d",&point[i][0],&point[i][1],&point[i][2]);

    for(i=0;i<n-1;i++)
		for(j=i+1;j<n;j++)
		{
			po->place_p1=i;
            po->p1[0]=point[i][0];
            po->p1[1]=point[i][1];
			po->p1[2]=point[i][2];
			po->place_p2=j;
			po->p2[0]=point[j][0];
			po->p2[1]=point[j][1];
			po->p2[2]=point[j][2];
			float d1,d2,d3;
			d1=(float)point[i][0]-point[j][0];
            d2=(float)point[i][1]-point[j][1];
            d3=(float)point[i][2]-point[j][2];
			po->distance=sqrt(d1*d1+d2*d2+d3*d3);
			po++;
		}

	for(i=0;i<n*(n-1)/2;i++)
		for(j=0;j<n*(n-1)/2;j++)
			if(p[j].distance<p[j+1].distance)
				exchange(&p[j],&p[j+1]);

	for(i=0,po=p;i<n*(n-1)/2;i++,po++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",po->p1[0],po->p1[1],po->p1[2],po->p2[0],po->p2[1],po->p2[2],po->distance);
}

void exchange(struct dis *pa,struct dis *pb)
{
	float temp;int i;
	int t;
	t=pa->place_p1;pa->place_p1=pb->place_p1;pb->place_p1=t;
	t=pa->place_p2;pa->place_p2=pb->place_p2;pb->place_p2=t;
	for(i=0;i<3;i++)
	{
		t=pa->p1[i];pa->p1[i]=pb->p1[i];pb->p1[i]=t;
		t=pa->p2[i];pa->p2[i]=pb->p2[i];pb->p2[i]=t;
	}

	temp=pa->distance;
	pa->distance=pb->distance;
	pb->distance=temp;
}


struct point{
	int x;
	int y;
	int z;
}point[10];
struct jl{
	int c;
	int d;
	float f;
}jl[45];
int main()
{
    int n,i,j;
	struct jl t;
	float juli(struct point a,struct point b);
	scanf("%d",&n);
    for(i=0;i<n;i++)
		scanf("%d%d%d",&point[i].x,&point[i].y,&point[i].z);
	for(i=0;i<n-1;i++)
		for(j=i+1;j<n;j++){
			jl[n*i-i*(i+1)/2+j-i-1].f=juli(point[i],point[j]);
			jl[n*i-i*(i+1)/2+j-i-1].c=i;
			jl[n*i-i*(i+1)/2+j-i-1].d=j;
		}
	for(j=1;j<n*(n-1)/2;j++)
		for(i=0;i<n*(n-1)/2-j;i++)
			if(jl[i].f<jl[i+1].f){
				t=jl[i];
				jl[i]=jl[i+1];
				jl[i+1]=t;
			}
	for(i=0;i<n*(n-1)/2;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",point[jl[i].c].x,point[jl[i].c].y,point[jl[i].c].z,point[jl[i].d].x,point[jl[i].d].y,point[jl[i].d].z,jl[i].f);
	return 0;
}
float juli(struct point a,struct point b)
{
	float k;
	k=sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)+(a.z-b.z)*(a.z-b.z));
	return k;
}


int main() {
    struct dot1 {
        int x;
        int y;
        int z;
    } dot[10];
    float dis[10][10]={0,0};
    float distance;
    int row, col, sign=0;
    int n, i, j;
    scanf("%d", &n);
    for (i=0;i<n;i++) {
        scanf("%d%d%d", &dot[i].x, &dot[i].y, &dot[i].z);
    }
    for (i=0;i<n;i++) {
        for(j=i+1;j<n;j++) {
            dis[i][j]=(float)(dot[i].x-dot[j].x)*(float)(dot[i].x-dot[j].x)+(float)(dot[i].y-dot[j].y)*(float)(dot[i].y-dot[j].y)+(float)(dot[i].z-dot[j].z)*(float)(dot[i].z-dot[j].z);
            dis[i][j]=sqrt((float)dis[i][j]);
        }
    }
    do {
        distance=dis[0][1];
        row=0;
        col=1;
    for(i=0;i<n;i++) {
        for (j=i+1;j<n;j++) {
            if (distance<dis[i][j]) {
                distance=dis[i][j];
                row=i;
                col=j;
            }
        }
    }
    printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n", dot[row].x, dot[row].y, dot[row].z, dot[col].x, dot[col].y, dot[col].z, distance);
    dis[row][col]=0;
        sign+=1;
    } while(sign!=(n-1)*n/2);
    return 0;
}


int main(){
    struct point{
           int x,y,z;
           }points[10];
    double d[45],e,a;
    int n,i,j,k=0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
            scanf("%d %d %d",&points[i].x,&points[i].y,&points[i].z);
            }
    for(i=0;i<n;i++){
                     for(j=i+1;j<n;j++){
                                        a=1.0*(points[i].x-points[j].x)*(points[i].x-points[j].x)+1.0*(points[i].y-points[j].y)*(points[i].y-points[j].y)+1.0*(points[i].z-points[j].z)*(points[i].z-points[j].z);
                                        d[k]=sqrt(a);
                                        k++;
                                        }
                                        }
    for(k=0;k<n*(n-1)/2;k++){
            for(i=0;i<n*(n-1)/2-1-k;i++){
			                        if(d[i]<d[i+1]){
					                                    e=d[i+1];
				                                        d[i+1]=d[i];
		                                                d[i]=e;
			                                            }
	                                 }
                           }
    for(k=1;k<n*(n-1)/2;k++){
                     if(d[k]==d[k-1]){
                                      d[k-1]=0;
                                      }
                                      }
    for(int b=0;b<n*(n-1)/2;b++){
             for(i=0;i<n;i++){
                     for(j=i+1;j<n;j++){
                                        a=1.0*(points[i].x-points[j].x)*(points[i].x-points[j].x)+1.0*(points[i].y-points[j].y)*(points[i].y-points[j].y)+1.0*(points[i].z-points[j].z)*(points[i].z-points[j].z);
                                        e=sqrt(a);
                                        if(d[b]==e){
                                                    printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",points[i].x,points[i].y,points[i].z,points[j].x,points[j].y,points[j].z,d[b]);
                                                    }

                                        }
                     }
    }
    return 0;
}


float dist(int a,int b,int c,int a1,int b1,int c1);
int toi(int fi,int ni);
int toj(int fj,int nj);

int main()
{
	int x[10],y[10],z[10];
	int n,i,j,o=1,flag,ansi,ansj;
	float d[46];
	float max;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	    scanf("%d%d%d",&x[i],&y[i],&z[i]);
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
	        d[o]=dist(x[i],y[i],z[i],x[j],y[j],z[j]);
			o++;
		}
	}
	for(i=1;i<o;i++)
	{
		max=0;
		for(j=1;j<o;j++)
		{
			if(d[j]>max)
			{
				max=d[j];
				flag=j;
			}
			else
				continue;
		}
		ansi=toi(flag,n);
		ansj=toj(flag,n);
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",x[ansi],y[ansi],z[ansi],x[ansj],y[ansj],z[ansj],max);
		d[flag]=0;
	}
	return 0;
}

float dist(int a,int b,int c,int a1,int b1,int c1)
{
	float D;
	D=sqrt((a-a1)*(a-a1)+(b-b1)*(b-b1)+(c-c1)*(c-c1));
	return(D);
}

int toi(int fi,int ni)
{
	int ai,testfi,qi;
	testfi=fi;
	qi=1;
	do
	{
	    if(testfi-(ni-qi)<=0)
		{
			ai=qi-1;
			break;
		}
		else
		{
			testfi-=ni-qi;
	        qi++;
		}
	}while(qi<ni);
	return(ai);
}

int toj(int fj,int nj)
{
	int aj,testfj,qj;
	testfj=fj;
	qj=1;
	do
	{
		if(testfj-(nj-qj)<=0)
		{
			aj=testfj+qj-1;
			break;
		}
		else
		{
			testfj-=nj-qj;
			qj++;
		}
	}while(qj<nj);
	return(aj);
}


/*
 * fuck.cpp
 *
 *  Created on: 2011-12-16
 *      Author: guan hong wei
 */
struct locations//????,????
{
int x;
int y;
int z;
}locations[100];
struct distances//?????????
{
int i;
int j;
double distance;
}distances[100];
struct distances m;
int main()
{
int n,i,j,t=0;
cin>>n;//?????
for(i=0;i<n;i++)
{
cin>>locations[i].x>>locations[i].y>>locations[i].z;//??????
}
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{
distances[t].i=i;
distances[t].j=j;
distances[t].distance=sqrt((double)(pow(locations[i].x-locations[j].x,2.0)+pow(locations[i].y-locations[j].y,2.0)+pow(locations[i].z-locations[j].z,2.0)));//????
t++;
}
}
for(i=0;i<t;i++)//???????????
{
for(j=t-1;j>i;j--)
{
if(distances[j].distance>distances[j-1].distance)
{
m=distances[j];
distances[j]=distances[j-1];
distances[j-1]=m;
}
}
}
for(i=0;i<t;i++)
{
cout<<'('<<locations[distances[i].i].x<<','<<locations[distances[i].i].y<<','<<locations[distances[i].i].z<<')'<<'-'<<'('<<locations[distances[i].j].x<<','<<locations[distances[i].j].y<<','<<locations[distances[i].j].z<<")="<<fixed<<setprecision(2)<<distances[i].distance<<endl;
}
return 0;
}


typedef struct Point
{
int x;
int y;
int z;
}Point;
double Distance(Point *p1,Point *p2)
{
int x=(p1->x)-(p2->x);
int y=(p1->y)-(p2->y);
int z=(p1->z)-(p2->z);
double temp=(double)(x*x+y*y+z*z);
return sqrt(temp);
}
void Input(Point *p[],int n)
{
int i;
for(i=0;i<n;i++)
{
p[i]=(Point *)malloc(sizeof(Point));
scanf("%d",&p[i]->x);
scanf("%d",&p[i]->y);
scanf("%d",&p[i]->z);
}
}
void Output(Point *p1,Point *p2)
{
printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n\n",p1->x,p1->y,p1->z,p2->x,p2->y,p2->z,Distance(p1,p2));

}
int main()
{
int n,i,j;

scanf("%d",&n);
Point *p[10];
Input(p,n);
double a[10*(10-1)/2];
int k=0;
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{	int t=0;
while(t<k+1 &&(a[t]-Distance(p[i],p[j])>0.00001 ||Distance(p[i],p[j])-a[t]>0.00001))	t++;
if(t==k+1){	a[k]=Distance(p[i],p[j]);  k++; }

}
}
int count=k;
for(i=0;i<count;i++)
{
for(j=i+1;j<count;j++)
{
if(a[i]<a[j])
{	double temp=a[i]; a[i]=a[j]; a[j]=temp;	}
}
}

k=0;
while(k<count)
{
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{	if(a[k]>Distance(p[i],p[j]))
{	if(a[k]-Distance(p[i],p[j])<0.000001)
Output(p[i],p[j]);
}
else
{
if(Distance(p[i],p[j])-a[k]<0.000001)
Output(p[i],p[j]);
}
}
}
k++;
}
}


 struct
{
    int x,y,z;
}a[12];

struct
{
    int x1,x2,y1,y2,z1,z2;
    double l;
}dis[120],t;
void sort(int a)
{
     for (int i=0; i<a; i++)
     for (int j=0; j<a-1-i; j++)
     {

         if (dis[j].l < dis[j+1].l)
         {
             t= dis[j];
             dis[j] = dis[j+1];
             dis[j+1] = t;
         }
     }
     for (int i=0; i<a; i++)
     {
         cout << "(" << dis[i].x1 << "," << dis[i].y1 << "," << dis[i].z1
         << ")-(" << dis[i].x2 << "," << dis[i].y2 << "," << dis[i].z2 <<
         ")=" << fixed << setprecision(2) << dis[i].l <<endl;
     }
}

int main()
{
    int n;
    cin >> n;
    for (int i=0; i<n; i++)
    {
        cin >> a[i].x >> a[i].y >> a[i].z ;
    }
    int count = 0;
    for (int i=0; i<n; i++)
    {
        for (int j=i+1; j<n; j++)
        {

            dis[count].l = sqrt((a[i].x-a[j].x)*(a[i].x-a[j].x)+(a[i].y-a[j].y)
            *(a[i].y-a[j].y)+(a[i].z-a[j].z)*(a[i].z-a[j].z));
            dis[count].x1 = a[i].x;
            dis[count].x2 = a[j].x;
            dis[count].y1 = a[i].y;
            dis[count].y2 = a[j].y;
            dis[count].z1 = a[i].z;
            dis[count].z2 = a[j].z;
            count++;
        }
    }
    sort (count);
    cin >> n;
    return 0;
}


struct point{
	int x;
	int y;
	int z;
};
struct diskumi{
	struct point po1;
	struct point po2;
	double dist;
};
int main()
{
	int n;
	int xa[15],ya[15],za[15];
	struct diskumi dis[45];
	int baka;
	double cir;
	int i,j,k=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d %d %d",&xa[i],&ya[i],&za[i]);
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			dis[k].po1.x=xa[i];
			dis[k].po1.y=ya[i];
			dis[k].po1.z=za[i];
			dis[k].po2.x=xa[j];
			dis[k].po2.y=ya[j];
			dis[k].po2.z=za[j];
			dis[k].dist=sqrt((xa[i]-xa[j])*(xa[i]-xa[j])+(ya[i]-ya[j])*(ya[i]-ya[j])+(za[i]-za[j])*(za[i]-za[j]));
			k++;
		}
	}
	for(i=0;i<k-1;i++)
	{
		for(j=0;j<k-i-1;j++)
		{
			if(dis[j+1].dist>dis[j].dist)
			{
				baka=dis[j].po1.x;
				dis[j].po1.x=dis[j+1].po1.x;
				dis[j+1].po1.x=baka;
				baka=dis[j].po1.y;
				dis[j].po1.y=dis[j+1].po1.y;
				dis[j+1].po1.y=baka;
				baka=dis[j].po1.z;
				dis[j].po1.z=dis[j+1].po1.z;
				dis[j+1].po1.z=baka;

				baka=dis[j].po2.x;
				dis[j].po2.x=dis[j+1].po2.x;
				dis[j+1].po2.x=baka;
				baka=dis[j].po2.y;
				dis[j].po2.y=dis[j+1].po2.y;
				dis[j+1].po2.y=baka;
				baka=dis[j].po2.z;
				dis[j].po2.z=dis[j+1].po2.z;
				dis[j+1].po2.z=baka;

				cir=dis[j].dist;
				dis[j].dist=dis[j+1].dist;
				dis[j+1].dist=cir;
			}
		}
	}
	k--;
	printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf",dis[0].po1.x,dis[0].po1.y,dis[0].po1.z,dis[0].po2.x,dis[0].po2.y,dis[0].po2.z,dis[0].dist);
	for(i=1;i<=k;i++)
	{
		printf("\n(%d,%d,%d)-(%d,%d,%d)=%.2lf",dis[i].po1.x,dis[i].po1.y,dis[i].po1.z,dis[i].po2.x,dis[i].po2.y,dis[i].po2.z,dis[i].dist);
	}
}


typedef struct Point
{
	int x,y,z;
}Point;

typedef struct Distance
{
	double len;
	int pt1,pt2;
}Distance;

double CalDis(Point pt1,Point pt2)
{
	return sqrt((double)(pt1.x-pt2.x)*(pt1.x-pt2.x)+(pt1.y-pt2.y)*(pt1.y-pt2.y)+(pt1.z-pt2.z)*(pt1.z-pt2.z));
}

int cmp( const void *a ,const void *b)
{
	if((*(Distance *)b).len != (*(Distance *)a).len)
		return (*(Distance *)b).len > (*(Distance *)a).len ? 1 : -1;
	else
		return (*(Distance *)a).pt1 > (*(Distance *)b).pt1 ? 1 : -1;
}

Distance ds[N];

int main()
{
	int n,count=0,i,j;
	Point pts[11];

	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d %d %d",&pts[i].x,&pts[i].y,&pts[i].z);

	for(i=0;i<n;i++)
		for(j=i+1;j<n;j++)
		{
			ds[count].len=CalDis(pts[i],pts[j]);
			ds[count].pt1=i;
			ds[count++].pt2=j;
		}

	qsort(ds,count,sizeof(ds[0]),cmp);

	for(i=0;i<count;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",pts[ds[i].pt1].x,pts[ds[i].pt1].y,
		pts[ds[i].pt1].z,pts[ds[i].pt2].x,pts[ds[i].pt2].y,pts[ds[i].pt2].z,ds[i].len);

	return 0;
}


struct suanshi{
	int a[3],b[3];
	int no;
	float x;
}dian[45];
int cmp(const void *a,const void *b){
	struct suanshi *aa=(struct suanshi *)a;
	struct suanshi *bb=(struct suanshi *)b;
	if((aa->x)<(bb->x))return 1;
	if((aa->x)>(bb->x))return -1;
	else return (aa->no)-(bb->no);
}
void main(){
	int point[11][3];
	int n,i,j,t=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)scanf("%d%d%d",&point[i][0],&point[i][1],&point[i][2]);
	for(i=0;i<n;i++){
		for(j=i+1;j<n;j++){
			dian[t].no=t+1;
			dian[t].a[0]=point[i][0];dian[t].a[1]=point[i][1];dian[t].a[2]=point[i][2];
			dian[t].b[0]=point[j][0];dian[t].b[1]=point[j][1];dian[t].b[2]=point[j][2];
			dian[t].x=sqrt((point[i][0]-point[j][0])*(point[i][0]-point[j][0])+(point[i][1]-point[j][1])*(point[i][1]-point[j][1])+(point[i][2]-point[j][2])*(point[i][2]-point[j][2]));
			t++;
		}
	}
	for(j=0;n>0;){
		n--;
		j+=n;
	}
	qsort(dian,j,sizeof(struct suanshi),cmp);
	for(i=0;i<j;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",dian[i].a[0],dian[i].a[1],dian[i].a[2],dian[i].b[0],dian[i].b[1],dian[i].b[2],dian[i].x);
}


int main()
{
		double cd[1000],s;
	struct zuobiao{int x,y,z;}zuobiao[100];
	struct jl{int q,w,e,r,t,u;}jl[1000];
	int i,j,n,k,a,b,c,d,f,g;
scanf("%d",&n);

	k=0;

    for(i=0;i<n;i++)
		scanf("%d%d%d",&(zuobiao[i].x),&(zuobiao[i].y),&(zuobiao[i].z));
    for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
           cd[k]=sqrt((zuobiao[i].x-zuobiao[j].x)*(zuobiao[i].x-zuobiao[j].x)+(zuobiao[i].y-zuobiao[j].y)*(zuobiao[i].y-zuobiao[j].y)+(zuobiao[i].z-zuobiao[j].z)*(zuobiao[i].z-zuobiao[j].z));
		   jl[k].q=zuobiao[i].x;
jl[k].w=zuobiao[i].y;
jl[k].e=zuobiao[i].z;
jl[k].r=zuobiao[j].x;
jl[k].t=zuobiao[j].y;
jl[k].u=zuobiao[j].z;
		   k=k+1;
		}
	}
    for(j=1;j<=k;j++)
	{
		for(i=0;i<k-j;i++)
		{
            if(cd[i]<cd[i+1])
			{
				s=cd[i];cd[i]=cd[i+1];cd[i+1]=s;
                a=jl[i].q;
jl[i].q=jl[i+1].q;
jl[i+1].q=a;
                b=jl[i].w;
jl[i].w=jl[i+1].w;
jl[i+1].w=b;
                c=jl[i].e;
jl[i].e=jl[i+1].e;
jl[i+1].e=c;
				d=jl[i].r;
jl[i].r=jl[i+1].r;
jl[i+1].r=d;
				f=jl[i].t;
jl[i].t=jl[i+1].t;
jl[i+1].t=f;
				g=jl[i].u;
jl[i].u=jl[i+1].u;
jl[i+1].u=g;
			}
		}
	}
	for(i=0;i<k;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",jl[i].q,jl[i].w,jl[i].e,jl[i].r,jl[i].t,jl[i].u,cd[i]);
	return 0;
}


typedef struct Point
{
int x;
int y;
int z;
}Point;
double Distance(Point *p1,Point *p2)
{
int x=(p1->x)-(p2->x);
int y=(p1->y)-(p2->y);
int z=(p1->z)-(p2->z);
double temp=(double)(x*x+y*y+z*z);
return sqrt(temp);
}
void Input(Point *p[],int n)
{
int i;
for(i=0;i<n;i++)
{
p[i]=(Point *)malloc(sizeof(Point));
scanf("%d",&p[i]->x);
scanf("%d",&p[i]->y);
scanf("%d",&p[i]->z);
}
}
void Output(Point *p1,Point *p2)
{
printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n\n",p1->x,p1->y,p1->z,p2->x,p2->y,p2->z,Distance(p1,p2));
}
int main()
{
int n,i,j;
scanf("%d",&n);
Point *p[100];
Input(p,n);
double a[100];
int k=0;
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{	int t=0;
while(t<k+1 &&(a[t]-Distance(p[i],p[j])>0.00001 ||Distance(p[i],p[j])-a[t]>0.00001))	t++;
if(t==k+1){	a[k]=Distance(p[i],p[j]);  k++; }
}
}
int count=k;
for(i=0;i<count;i++)
{
for(j=i+1;j<count;j++)
{
if(a[i]<a[j])
{	double temp=a[i]; a[i]=a[j]; a[j]=temp;	}
}
}
k=0;
while(k<count)
{
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{	if(a[k]>Distance(p[i],p[j]))
{	if(a[k]-Distance(p[i],p[j])<0.000001)
Output(p[i],p[j]);
}
else
{
if(Distance(p[i],p[j])-a[k]<0.000001)
Output(p[i],p[j]);
}
}
}
k++;
}
}


struct POINT{
	int x, y, z;
};

struct DISTANCE{
	int pointx, pointy;
	double dis;
};

int cmp(const void* e1, const void* e2){
	struct DISTANCE* elem1 = (struct DISTANCE*)e1;
	struct DISTANCE* elem2 = (struct DISTANCE*)e2;
	if(elem1->dis == elem2->dis)
		return (elem1->pointx) - (elem2->pointx);
	if(elem1->dis > elem2->dis)
		return -1;
	return 1;
}

int main(){
	int n;
	struct POINT data[11];
	struct DISTANCE distance[10000];
	scanf("%d", &n);
	int i;
	for(i=0; i<n; i++)
		scanf("%d %d %d", &(data[i].x), &(data[i].y), &(data[i].z));
	int j;
	int cnt = 0;
	for(i=0; i<n; i++)
		for(j=i+1; j<n; j++){
			distance[cnt].pointx = i;
			distance[cnt].pointy = j;
			distance[cnt].dis = sqrt((data[i].x-data[j].x)*(data[i].x-data[j].x)+(data[i].y-data[j].y)*(data[i].y-data[j].y)+(data[i].z-data[j].z)*(data[i].z-data[j].z));
			cnt++;
		}
	qsort(distance, cnt, sizeof(struct DISTANCE), cmp);
	for(i=0; i<cnt; i++){
		int x=distance[i].pointx;
		int y=distance[i].pointy;
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n", data[x].x, data[x].y, data[x].z, data[y].x, data[y].y, data[y].z, distance[i].dis);
	}
	return 0;
}


/*
 * justexp.cpp
 *
 *  Created on: 2011-11-18
 *      Author: dell
 */
int main()
{
	int n,m,i,j,k,l;
	cin>>n;
	m=n*(n-1)/2;
	int point[n][3];
	for(i=0;i<n;i++)
		cin>>point[i][0]>>point[i][1]>>point[i][2];
	struct data
	{
		int point1[3];
		int point2[3];
		float len;
		int mark1;
		int mark2;
	}distance[m],temp;
	for(k=i=0;i<n-1;i++)
		for(j=i+1;j<n;j++,k++)
		{
			distance[k].len=0;
			for(l=0;l<3;l++)
			{
				distance[k].mark1=i;
				distance[k].mark2=j;
				distance[k].point1[l]=point[i][l];
				distance[k].point2[l]=point[j][l];
				distance[k].len+=(point[i][l]-point[j][l])*(point[i][l]-point[j][l]);
			}
			distance[k].len=sqrt(distance[k].len);
		}
	for(i=0;i<m-1;i++)
		for(j=i+1;j<m;j++)
		{
			if(distance[i].len<distance[j].len)
			{
				temp=distance[i];
				distance[i]=distance[j];
				distance[j]=temp;
			}
			if(distance[i].len==distance[j].len)
			{
				if((distance[i].mark1>distance[j].mark1)||((distance[i].mark1==distance[j].mark1)&&(distance[i].mark2>distance[j].mark2)))
				{
					temp=distance[i];
					distance[i]=distance[j];
					distance[j]=temp;
				}
			}
		}
	for(i=0;i<m;i++)
	{
		cout<<'('<<distance[i].point1[0]<<','<<distance[i].point1[1]<<','<<distance[i].point1[2]<<')';
		cout<<'-';
		cout<<'('<<distance[i].point2[0]<<','<<distance[i].point2[1]<<','<<distance[i].point2[2]<<')';
		printf("=%.2f\n",distance[i].len);
	}
	return 0;
}


int main(){
	int n,i,j;
	scanf("%d",&n);
struct point
{
	int x;
	int y;
	int z;
}
point[10];
for(i=0;i<n;i++){
	scanf("%d%d%d",&point[i].x,&point[i].y,&point[i].z);
}
struct len
{
  double s;
  struct point p1,p2;
}
len[45];
int k=0;
for(j=0;j<n-1;j++){
	for(i=j+1;i<n;i++){
		len[k].s=sqrt((point[j].x-point[i].x)*(point[j].x-point[i].x)+(point[j].y-point[i].y)*(point[j].y-point[i].y)+(point[j].z-point[i].z)*(point[j].z-point[i].z));
		len[k].p1.x=point[j].x;
		len[k].p1.y=point[j].y;
		len[k].p1.z=point[j].z;
		len[k].p2.x=point[i].x;
		len[k].p2.y=point[i].y;
		len[k].p2.z=point[i].z;
		k++;
	}
}
double e;
int f,g,h,l,m,o;
for(j=1;j<=k;j++){
	for(i=k-1;i>j-1;i--){
		if(len[i-1].s<len[i].s){
			e=len[i-1].s;        f=len[i-1].p1.x;            g=len[i-1].p2.x;           h=len[i-1].p1.y;          l=len[i-1].p2.y;             m=len[i-1].p1.z;          o=len[i-1].p2.z;
			len[i-1].s=len[i].s; len[i-1].p1.x=len[i].p1.x;  len[i-1].p2.x=len[i].p2.x;  len[i-1].p1.y=len[i].p1.y; len[i-1].p2.y=len[i].p2.y; len[i-1].p1.z=len[i].p1.z;len[i-1].p2.z=len[i].p2.z;
			len[i].s=e;          len[i].p1.x=f;              len[i].p2.x=g;              len[i].p1.y=h;             len[i].p2.y=l;             len[i].p1.z=m;             len[i].p2.z=o;
		}
	}
}
for(i=0;i<k;i++){
	printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",len[i].p1.x,len[i].p1.y,len[i].p1.z,len[i].p2.x,len[i].p2.y,len[i].p2.z,len[i].s);
}
  return 0;
 }


int main(){
	int pointnum,groupnum,i,j,k;
	int point[10][3]={0};
	cin>>pointnum;
	groupnum=pointnum*(pointnum-1)/2;
	for(i=0;i<pointnum;i++)
		for(j=0;j<3;j++)
			cin>>point[i][j];
	int group[45][6]={0};
	double result[45];
	for(i=0;i<45;i++)
		result[i]=0;
	for(i=k=0;i<pointnum-1;i++)
		for(j=i+1;j<pointnum;j++)
		{
			group[k][0]=point[i][0];
			group[k][1]=point[i][1];
			group[k][2]=point[i][2];
			group[k][3]=point[j][0];
			group[k][4]=point[j][1];
			group[k][5]=point[j][2];
			result[k]=sqrt((double)(point[i][0]-point[j][0])*(point[i][0]-point[j][0])+(point[i][1]-point[j][1])*(point[i][1]-point[j][1])+(point[i][2]-point[j][2])*(point[i][2]-point[j][2]));
			k++;
		}
	double temp1;
	int temp[6];
	for(i=0;i<groupnum-1;i++)
		for(j=0;j<groupnum-1-i;j++)
			if(result[j]<result[j+1])
			{
				temp1=result[j];
				result[j]=result[j+1];
				result[j+1]=temp1;
				for(k=0;k<6;k++)
					temp[k]=group[j][k];
				for(k=0;k<6;k++)
					group[j][k]=group[j+1][k];
				for(k=0;k<6;k++)
					group[j+1][k]=temp[k];
			}
	for(i=0;i<groupnum;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",group[i][0],group[i][1],group[i][2],group[i][3],group[i][4],group[i][5],result[i]);
	return 0;
}


struct equal{
  int i1,j1,k1;
  int i2,j2,k2;
  double distance;
};

void bubblesort(struct equal d[],int n);
struct node{
int i,j,k;
};
int main(){
  int n,i;
  scanf("%d",&n);
  struct node aa[n];
  for( i=0;i<n;i++)
	{scanf("%d%d%d",&(aa[i].i),&(aa[i].j),&(aa[i].k));
	}
  struct equal equal1[1000];
  int a,b,c,g,p=0;
  for(a=0;a<n;a++){
     for(b=a+1;b<n;b++){
         equal1[p].i1=aa[a].i;equal1[p].j1=aa[a].j;equal1[p].k1=aa[a].k;
         equal1[p].i2=aa[b].i;equal1[p].j2=aa[b].j;equal1[p].k2=aa[b].k;
         equal1[p].distance=sqrt(pow((double)(equal1[p].i1-equal1[p].i2),2)+pow((double)(equal1[p].j1-equal1[p].j2),2)+pow((double)(equal1[p].k1-equal1[p].k2),2));
	      p++;
     }
  }
  bubblesort(equal1,p);
  for(g=0;g<p;g++){
  printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",equal1[g].i1,equal1[g].j1,equal1[g].k1,equal1[g].i2,equal1[g].j2,equal1[g].k2,equal1[g].distance);
  }
  return 0;
}

void bubblesort(struct equal d[],int n){
	int i,j,m;double t;
	for(i=0;i<n;i++){
		for(j=n-1;j>i;j--){
		   if(d[j].distance>d[j-1].distance){
			 t=d[j].distance;d[j].distance=d[j-1].distance;d[j-1].distance=t;
             m=d[j].i1;d[j].i1=d[j-1].i1;d[j-1].i1=m;
             m=d[j].i2;d[j].i2=d[j-1].i2;d[j-1].i2=m;
             m=d[j].j1;d[j].j1=d[j-1].j1;d[j-1].j1=m;
             m=d[j].k1;d[j].k1=d[j-1].k1;d[j-1].k1=m;
             m=d[j].j2;d[j].j2=d[j-1].j2;d[j-1].j2=m;
             m=d[j].k2;d[j].k2=d[j-1].k2;d[j-1].k2=m;
		   }
        }
	}
}


int main()
{
    int n, i, j;
    int location[11][3];
    int (*p)[3];
    cin >> n;
    for ( i = 1; i <= n; i++ )
    {
        for ( j = 0; j < 3; j++ )
        {
            cin >> location[i][j];
        }
    }
    struct team
    {
           int a1;
           int a2;
           double distance;
    } zu[45], t;
    int k = 0;
    p = location;
    for ( i = 1; i < n; i++ )
    {
        for ( j = i + 1; j <= n; j++ )
        {
            zu[k].a1 = i;
            zu[k].a2 = j;
            int x, y, z;
            x = location[i][0] - location[j][0];
            y = location[i][1] - location[j][1];
            z = location[i][2] - location[j][2];
            zu[k].distance = sqrt ( x * x + y * y + z * z );
            k++;
        }
    }
    for ( i = 0; i < k - 1; i++ )
    {
        for ( j = i + 1; j < k; j++ )
        {
            if ( zu[i].distance - zu[j].distance < -0.01 )
            {
                 t = zu[i];
                 zu[i] = zu[j];
                 zu[j] = t;
            }
            else if ( fabs( zu[i].distance - zu[j].distance ) < 0.01 )
                 {
                      if ( zu[i].a1 > zu[j].a1 )
                      {
                           t = zu[i];
                           zu[i] = zu[j];
                           zu[j] = t;
                      }
                      else if ( zu[i].a1 == zu[j].a1 )
                           {
                                if ( zu[i].a2 > zu[j].a2 )
                                {
                                     t = zu[i];
                                     zu[i] = zu[j];
                                     zu[j] = t;
                                }
                           }
                 }
        }
    }
    for ( i = 0; i < k; i++ )
    {
        cout << "(" << location[zu[i].a1][0] << "," << location[zu[i].a1][1] << "," << location[zu[i].a1][2] << ")-("
             << location[zu[i].a2][0] << "," << location[zu[i].a2][1] << "," << location[zu[i].a2][2] << ")="
             << fixed << setprecision(2) << zu[i].distance << endl;
    }
    return 0;
}


int read();
void calculate();
void sort();
double sqr(double p);
int print();
int x[100],y[100],z[100],n;
double a[100][100];
int main()
{
    read();
    calculate();
    print();
    return 0;
}
int read()
{
    int i;
    scanf("%d",&n);
    for (i=1;i<=n;i++)
        scanf ("%d%d%d",&x[i],&y[i],&z[i]);
    return 0;
}
void calculate()
{
    int i,j;
    for (i=1;i<n;i++)
        for (j=i+1;j<=n;j++)
            a[i][j]=sqr((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])+(z[i]-z[j])*(z[i]-z[j]));
    return;
}
int print()
{
    int i,j,k,l,p;
    double max;
    p=n*(n-1)/2;
    while (p>0)
    {
        max=-1;
        for (i=1;i<n;i++)
            for(j=n;j>i;j--)
            {
                if (max<a[i][j])
                {
                max=a[i][j];
                 k=i;
                  l=j;
                   }
                 else if (max==a[i][j])
                {
                    if (k>i) {
                        k=i;
                        l=j;
                    }
                    else if (k==i&&l>j)
                    {
                        l=j;
                    }
                }
            }
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[k],y[k],z[k],x[l],y[l],z[l],a[k][l]);
        a[k][l]=-100;
        p--;
    }
    return 0;
}
double sqr(double p)
{
    double x1,x2;
    x2=p;
    x1=1.0;
    while (fabs(x2-x1)>1e-10)
    {
        x1=x2;
        x2=(x1+p/x1)/2;
    }
    return x2;
}


int main()
{
    struct point
    {
        int NO;//????
        double x;double y;double z;//????
        double d[10];//??????
    }points[10];
//??????? ? ???
    struct data
    {
        int num;
        int fromx;int fromy;int fromz;
        int tox;int toy;int toz;
        double dd;
    }result[45+5],temp;
//??????? ?? ???
    int n;
    cin>>n;
//????
    for(int i=0;i<=n-1;i++)
    {
        points[i].NO=i+1;
        cin>>points[i].x>>points[i].y>>points[i].z;
    }
//?????
    int k=0;
    int end;

    for(int i=0;i<=n-2;i++)
        for(int j=i+1;j<=n-1;j++)
            {
                result[++k].dd=points[i].d[j]=sqrt((points[i].x-points[j].x)*(points[i].x-points[j].x)+
                                    (points[i].y-points[j].y)*(points[i].y-points[j].y)+
                                    (points[i].z-points[j].z)*(points[i].z-points[j].z));
                result[k].fromx=(int)points[i].x;
                result[k].fromy=(int)points[i].y;
                result[k].fromz=(int)points[i].z;
                result[k].tox=(int)points[j].x;
                result[k].toy=(int)points[j].y;
                result[k].toz=(int)points[j].z;
                result[k].num=k;
                end=k;
            }
//???????
    for(int i=1;i<=end;i++)
        for(int j=i;j<=end;j++)
            {
                if(result[i].dd<result[j].dd)
                {
                    temp=result[i];
                    result[i]=result[j];
                    result[j]=temp;
                }
            }
//?????????
    for(int i=1;i<=end;i++)
        for(int j=i;j<=end;j++)
            {
                if(result[i].dd==result[j].dd&&result[i].num>result[j].num)
                {
                    temp=result[i];
                    result[i]=result[j];
                    result[j]=temp;
                }
            }
//????????????
    for(int i=1;i<=end;i++)
    {
        cout<<"("<<result[i].fromx<<","<<result[i].fromy<<","<<result[i].fromz<<")-("
                 <<result[i].tox<<","<<result[i].toy<<","<<result[i].toz<<")="
                 <<fixed<<setprecision(2)<<result[i].dd<<endl;
    }
//??
    return 0;
}


/**
* @file C12Q4.cpp
* @author ???
* @date 2013-12-14
* @description
* ??????:????
*/

typedef struct node
{
	int x,y,z;
}node;

typedef struct distance
{
	node*pn1,*pn2;
	double v;
}dis;

int main()
{
	int n;
	node ns[MAX];
	dis ds[MAX*MAX];
	cin >> n;
	for(int i = 0 ; i < n ; i++)
	{
		cin >> ns[i].x >> ns[i].y >> ns[i].z;
	}
	int p = 0 ;
	for(int i = 0 ; i < n ; i++)
		for(int j = i+1 ; j < n ; j++)
		{
			ds[p].pn1 = ns+i;
			ds[p].pn2 = ns+j;
			ds[p].v = sqrt((ns[i].x - ns[j].x)*(ns[i].x - ns[j].x)+(ns[i].y - ns[j].y)*(ns[i].y - ns[j].y)
				+(ns[i].z - ns[j].z)*(ns[i].z - ns[j].z));
			p++;
		}
	for(int i = 0 ; i < p ; i++)
	{
		for(int j = p-1; j > i ; j--)
		{
			if (ds[j].v > ds[j-1].v)
			{
				dis tmp = ds[j];
				ds[j] = ds[j-1];
				ds[j-1] = tmp;
			}
		}
	}

	for(int i = 0 ; i < p ; i ++)
	{
		cout << '(' <<ds[i].pn1 ->x << ',' << ds[i].pn1 ->y << ',' << ds[i].pn1 ->z << ')' << '-' ;
		cout << '(' <<ds[i].pn2 ->x << ',' << ds[i].pn2 ->y << ',' << ds[i].pn2 ->z << ')' << '=' ;
		cout << setprecision(2) << fixed <<ds[i].v << endl;
	}
	return 0;
}


int main ()
{int n;
scanf ("%d",&n);
struct dot
{
    int x,y,z;
    double len[9];
}
dots[10];
for (int i1=0;i1<n;i1++)
{
  scanf("%d%d%d",&dots[i1].x,&dots[i1].y,&dots[i1].z);

}
for (int i2=0;i2<n-1;i2++)
{
  for (int i3=n-i2-2;i3>=0;i3--)
  {
      dots[i2].len[n-i2-2-i3]=(dots[i2].x-dots[n-i3-1].x)*(dots[i2].x-dots[n-i3-1].x)+(dots[i2].y-dots[n-i3-1].y)*(dots[i2].y-dots[n-i3-1].y)+(dots[i2].z-dots[n-i3-1].z)*(dots[i2].z-dots[n-i3-1].z);
      dots[i2].len[n-i2-2-i3]=sqrt(dots[i2].len[n-i2-2-i3]);
  }
}

for (int j=0;j<n*(n-1)/2;j++)
{int maxq=0,maxh=0;
double lmax=0.0;
for (int i4=0;i4<n-1;i4++)
{
    for (int i5=0;i5<=n-2-i4;i5++)
    {
        if (dots[i4].len[i5]>lmax){lmax=dots[i4].len[i5];maxq=i4;maxh=i4+i5+1;}
    }

}
printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",dots[maxq].x,dots[maxq].y,dots[maxq].z,dots[maxh].x,dots[maxh].y,dots[maxh].z,dots[maxq].len[maxh-1-maxq]);
dots[maxq].len[maxh-1-maxq]=0;
}
    return 0;
}


double juli(int a,int b,int c,int d,int e,int f)
{
    int x,y,z;
    double sum;
    x=d-a;
    y=e-b;
    z=f-c;
    sum=x*x+y*y+z*z;
    sum=sqrt(sum);
    return sum;
}
int main()
{
    int n,i,j;
    int sz[10][3];
    double distance[45][9];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        for(j=0;j<3;j++)
        {
            scanf("%d",&sz[i][j]);
        }
        sz[i][3]=i;
    }
    int r=0,k;
    for(i=0;i<n;i++)
    {
        if(i<n-1)
        {
            for(j=i+1;j<n;j++)
            {
                distance[r][0]=sz[i][0];
                distance[r][1]=sz[i][1];
                distance[r][2]=sz[i][2];
                distance[r][3]=sz[i][3];
                distance[r][4]=sz[j][0];
                distance[r][5]=sz[j][1];
                distance[r][6]=sz[j][2];
                distance[r][7]=sz[j][3];
                distance[r][8]=juli(sz[i][0],sz[i][1],sz[i][2],sz[j][0],sz[j][1],sz[j][2]);
                r++;
            }
        }
    }
    for(i=0;i<r;i++)
    {
        for(j=0;j<r-i;j++)
        {
            double c[10];
            if(distance[j][8]<distance[j+1][8])
            {
                for(k=0;k<9;k++)
                {
                    c[k]=distance[j][k];
                }
                for(k=0;k<9;k++)
                {
                    distance[j][k]=distance[j+1][k];
                }
                for(k=0;k<9;k++)
                {
                    distance[j+1][k]=c[k];
                }
                //*c=*distance[j];
                //*distance[j]=*distance[j+1];
                //*distance[j+1]=*c;
            }
        }
    }
    for(i=0;i<r;i++)
    {
        printf("(%.0lf,%.0lf,%.0lf)-(%.0lf,%.0lf,%.0lf)=%.2lf\n",distance[i][0],distance[i][1],distance[i][2],distance[i][4],distance[i][5],distance[i][6],distance[i][8]);
    }
    return 0;
}


double distance(double q,double w,double e,double r,double t,double y);

int main(){
    int a,b,e,f,g,h,n,i;
    double d[10][10],c;
    struct z
    {
        double j;
        double k;
        double l;
    }
    s[10];
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%lf%lf%lf",&s[i].j,&s[i].k,&s[i].l);
    }
    for(a=0;a<n-1;a++){
        for(b=a+1;b<n;b++){
            d[a][b]=distance(s[a].j,s[a].k,s[a].l,s[b].j,s[b].k,s[b].l);
        }
    }
    for(e=n*(n-1)/2;e>0;e=e-1){
	    for(a=0,c=0;a<n-1;a++){
		    for(b=a+1;b<n;b++){
                          if(c<d[a][b]){
				    c=d[a][b];
                                    f=a;
			            g=b;
			  }
		    }
	    }
    	    d[f][g]=0;
            printf("(%.0lf,%.0lf,%.0lf)-(%.0lf,%.0lf,%.0lf)=%.2lf\n",s[f].j,s[f].k,s[f].l,s[g].j,s[g].k,s[g].l,c);
	}
	return 0;
}

double distance(double q,double w,double e,double r,double t,double y){
    double u;
    u=sqrt((q-r)*(q-r)+(w-t)*(w-t)+(e-y)*(e-y));
    return u;
}


struct dian{
float x;
float y;
float z;
};
struct diandui{
struct dian a;
struct dian b;
float dis;
};
void main(){
   int n,i,j,t=0;
   struct dian d[10];
   struct diandui dui[50],temp;
   scanf("%d",&n);
   for(i=0;i<n;i++){
   scanf("%f%f%f",&d[i].x,&d[i].y,&d[i].z);
   }
   for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            dui[t].a=d[i];
            dui[t].b=d[j];
            //printf("%f %f",d[i].x,d[j].x);
            dui[t].dis=sqrt((d[i].x-d[j].x)*(d[i].x-d[j].x)+(d[i].y-d[j].y)*(d[i].y-d[j].y)+(d[i].z-d[j].z)*(d[i].z-d[j].z));
            //printf("%.2f\n",dui[t].dis);
            t++;
        }
   }
   for(i=0;i<t;i++){
        for(j=0;j<t-1-i;j++){
            if(dui[j].dis<dui[j+1].dis){
                temp=dui[j];
                dui[j]=dui[j+1];
                dui[j+1]=temp;
            }
        }
   }
   for(i=0;i<t;i++){
        printf("(%.0f,%.0f,%.0f)-(%.0f,%.0f,%.0f)=%.2f\n",dui[i].a.x,dui[i].a.y,dui[i].a.z,dui[i].b.x,dui[i].b.y,dui[i].b.z,dui[i].dis);
   }
}


struct DIS
{
	int fir;
	int sec;
	double d;
};

int main()
{

   struct DIS dis[50];
   const double eps=1e-6;

   int x[11];
   int y[11];
   int z[11];
   int n,i,j,k=1;
   struct DIS temp;
   cin>>n;
   for(i=1;i<=n;i++)
   {
	   cin>>x[i]>>y[i]>>z[i];
   }
   for(i=1;i<=n-1;i++)
   {
	   for(j=i+1;j<=n;j++)
	   {
		   dis[k].fir=i;
		   dis[k].sec=j;
		   dis[k++].d=sqrt((double)(x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])+(z[i]-z[j])*(z[i]-z[j]));
	   }
   }
   for(i=1;i<=n*(n-1)/2;i++)
   {
	   for(j=n*(n-1)/2;j>=i+1;j--)
	   {
		   if(dis[j].d>dis[j-1].d+eps)
		   {
			   temp.d=dis[j].d;
			  temp.fir=dis[j].fir;
			  temp.sec=dis[j].sec;
			   dis[j].d=dis[j-1].d;
			   dis[j].fir=dis[j-1].fir;
			   dis[j].sec=dis[j-1].sec;

			   dis[j-1].d=temp.d;
			    dis[j-1].fir=temp.fir;
				dis[j-1].sec=temp.sec;
		   }
	   }
   }
   for(i=1;i<=n*(n-1)/2;i++)
   {
	   cout<<"("<<x[dis[i].fir]<<","<<y[dis[i].fir]<<","<<z[dis[i].fir]<<")-("<<x[dis[i].sec]<<","<<y[dis[i].sec]<<","<<z[dis[i].sec]<<")="<<fixed<<setprecision(2)<<dis[i].d<<endl;
   }

 return 0;

}


typedef struct
{
	int x;
	int y;
	int z;
} point3D; //?????????

typedef struct
{
	int firstPointIndex; //???????
	int lastPointIndex; //???????
	float distance;//?????
} result; //???? ??????

float getDistance(point3D p1, point3D p2)
{
	int temp;
	temp = (p1.x - p2.x) * (p1.x - p2.x) +
		   (p1.y - p2.y) * (p1.y - p2.y) +
		   (p1.z - p2.z) * (p1.z - p2.z);
	return sqrtf((float)temp);
}

int main()
{
	point3D points[MAXPOINTS]; //????? ???????
	result results[MAXRESULTS];//??????????????

	int i, j, k, pointNum, resultNum;

	result temp;

	//?????
	scanf("%d", &pointNum);

	resultNum = pointNum * (pointNum - 1) / 2;
	//?????
	for (i = 0; i <  pointNum; i++)
	{
		scanf("%d", &points[i].x);
		scanf("%d", &points[i].y);
		scanf("%d", &points[i].z);
	}

	//??????
	k = 0;
	for (i = 0; i < pointNum; i++)
	{
		for (j = i + 1; j < pointNum; j++)
		{
			results[k].firstPointIndex = i;
			results[k].lastPointIndex = j;
			results[k].distance = getDistance(points[i], points[j]);
			k++;
		}
	}

	//?????????? ??????
	for (i = 0; i < resultNum - 1; i++)
		for (j = 0; j < resultNum - i - 1; j++)
		{
			if (results[j].distance < results[j + 1].distance )
			{
				temp = results[j];
				results[j] = results[j + 1];
				results[j + 1] = temp;
			}
		}

	//????
	for (i = 0; i < resultNum; i++)
	{
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",
			   points[results[i].firstPointIndex].x,
			   points[results[i].firstPointIndex].y,
			   points[results[i].firstPointIndex].z,
			   points[results[i].lastPointIndex].x,
			   points[results[i].lastPointIndex].y,
			   points[results[i].lastPointIndex].z,
			   results[i].distance);
	}

	return 0;
}


struct point{
    int x;
    int y;
    int z;
};

struct distanceBetweenPoints{
    int pointIndex1;
    int pointIndex2;
    double distace;
};

double distance(struct point p1, struct point p2){
    double d =0.0;
    d = sqrt((p1.x - p2.x)*(p1.x - p2.x) + (p1.y - p2.y)*(p1.y - p2.y) + (p1.z - p2.z)*(p1.z - p2.z));
    return d;
}

int main(int argc, const char * argv[])
{
    int n;
    scanf("%d", &n);

    struct point points[n];
    for (int j=0; j<n; j++) {
        scanf("%d %d %d", &points[j].x, &points[j].y, &points[j].z);
    }

    struct distanceBetweenPoints distances[n*(n-1)/2];
    int index = 0;
    for (int index1=0; index1<n; index1++) {
        for (int index2=index1+1; index2<n; index2++) {
            double d = distance(points[index1], points[index2]);
            distances[index].distace = d;
            distances[index].pointIndex1 = index1;
            distances[index].pointIndex2 = index2;
            index ++;
        }
    }

    for (int i=0; i<index; i++) {
        for (int j=1; j<index-i; j++) {
            if (distances[j-1].distace < distances[j].distace) {
                struct distanceBetweenPoints temp;
                temp = distances[j-1];
                distances[j-1] = distances[j];
                distances[j] = temp;
            }
        }
    }

    for (int i = 0; i < index; i++) {
        printf("(%d,%d,%d)",points[distances[i].pointIndex1].x, points[distances[i].pointIndex1].y, points[distances[i].pointIndex1].z);
        printf("-");
        printf("(%d,%d,%d)",points[distances[i].pointIndex2].x, points[distances[i].pointIndex2].y, points[distances[i].pointIndex2].z);
        printf("=");
        printf("%.2lf\n", distances[i].distace);
    }

    return 0;
}


struct distance
{
	int sp1x;
	int sp1y;
	int sp1z;
	int sp2x;
	int sp2y;
	int sp2z;
	double dis;
} dis[999999],temp;
int main()
{
	int n,spot[9999][3]={0},t=0;
	cin>>n;
	for (int i=0;i<n;i++)
		cin>>spot[i][0]>>spot[i][1]>>spot[i][2];
	for (int i=0;i<n-1;i++)
		for (int j=i+1;j<n;j++)
		{
			dis[t].sp1x=spot[i][0];
			dis[t].sp1y=spot[i][1];
			dis[t].sp1z=spot[i][2];
			dis[t].sp2x=spot[j][0];
			dis[t].sp2y=spot[j][1];
			dis[t].sp2z=spot[j][2];
			dis[t].dis=sqrt(pow(spot[i][0]-spot[j][0],2.0) + pow(spot[i][1]-spot[j][1],2.0) + pow(spot[i][2]-spot[j][2],2.0));
			t++;
		}
	for (int i=0;i<=t-2;i++)
		for (int j=0;j<=t-2-i;j++)
			if (dis[j].dis<dis[j+1].dis)
			{
				temp=dis[j];
				dis[j]=dis[j+1];
				dis[j+1]=temp;
			}
	for (int i=0;i<t;i++)
		cout<<"("<<dis[i].sp1x<<","<<dis[i].sp1y<<","<<dis[i].sp1z<<")-("<<dis[i].sp2x<<","<<dis[i].sp2y<<","<<dis[i].sp2z<<")="
		<<fixed<<setprecision(2)<<dis[i].dis<<endl;
	return 0;
}


double juli(double m, double n, double l);
double juli(double m, double n, double l){
    double t;
    t= m*m+n*n+l*l;
    t=sqrt(t);
    return t;
}
int main(){
    int n,i,j,m;
    scanf("%d",&n);
    double x[11];
    double y[11];
    double z[11];
    double k[56];

    double jiawei1[56];
    double jiawei2[56];
    double jiawei3[56];

    double jianwei1[56];
    double jianwei2[56];
    double jianwei3[56];
    double tran;

    for(i=1;i<n+1;i++){
        scanf("%lf %lf %lf",&x[i],&y[i],&z[i]);
    }
    m=1;
    for(i=1;i<1+n;i++){
        for(j=i+1;j<n+1;j++){
            k[m]= juli(x[i]-x[j],y[i]-y[j],z[i]-z[j]);
            jiawei1[m]=x[i];
            jiawei2[m]=y[i];
            jiawei3[m]=z[i];
            jianwei1[m]=x[j];
            jianwei2[m]=y[j];
            jianwei3[m]=z[j];
            m=m+1;
        }
    }

    for(i=1;i<m;i++){
        for(j=i;j<m;j++){

            if(k[i]<k[j]){
                tran=k[i];
                k[i]=k[j];
                k[j]=tran;

                tran=jiawei1[i];
                jiawei1[i]=jiawei1[j];
                jiawei1[j]=tran;

                tran=jiawei2[i];
                jiawei2[i]=jiawei2[j];
                jiawei2[j]=tran;

                tran=jiawei3[i];
                jiawei3[i]=jiawei3[j];
                jiawei3[j]=tran;

                tran=jianwei1[i];
                jianwei1[i]=jianwei1[j];
                jianwei1[j]=tran;

                tran=jianwei2[i];
                jianwei2[i]=jianwei2[j];
                jianwei2[j]=tran;

                tran=jianwei3[i];
                jianwei3[i]=jianwei3[j];
                jianwei3[j]=tran;
            }
        }
        }
        int v=1;
        for(i=1;i<m;i++){

            for(j=i;j<m;j++){

                if(k[i]==k[j]){

                    for(v=1;v<n+1;v++){

                        if(
                            (jiawei1[i]==x[v]&&jiawei1[j]!=x[v])
                        ||(jiawei1[i]==jiawei1[j]&&jiawei2[i]==y[v]&&jiawei2[j]!=x[v])
                        ||(jiawei1[i]==jiawei1[j]&&jiawei2[i]==jiawei2[j]&&jiawei3[i]==z[v]&&jiawei3[j]!=z[v])
                        ||(jiawei1[i]==jiawei1[j]&&jiawei2[i]==jiawei2[j]&&jiawei3[i]==jiawei3[j]&&jianwei1[i]==x[v]&&jianwei1[j]!=x[v])
                        ||(jiawei1[i]==jiawei1[j]&&jiawei2[i]==jiawei2[j]&&jiawei3[i]==jiawei3[j]&&jianwei1[i]==jianwei1[j]&&jianwei2[i]==y[v]&&jianwei2[j]!=y[v])
                        ||(jiawei1[i]==jiawei1[j]&&jiawei2[i]==jiawei2[j]&&jiawei3[i]==jiawei3[j]&&jianwei1[i]==jianwei1[j]&&jianwei2[i]==jianwei2[j]&&jianwei3[i]==z[v]&&jianwei3[j]!=z[v])
                        ){

                tran=jiawei1[i];
                jiawei1[i]=jiawei1[j];
                jiawei1[j]=tran;

                tran=jiawei2[i];
                jiawei2[i]=jiawei2[j];
                jiawei2[j]=tran;

                tran=jiawei3[i];
                jiawei3[i]=jiawei3[j];
                jiawei3[j]=tran;

                tran=jianwei1[i];
                jianwei1[i]=jianwei1[j];
                jianwei1[j]=tran;

                tran=jianwei2[i];
                jianwei2[i]=jianwei2[j];
                jianwei2[j]=tran;

                tran=jianwei3[i];
                jianwei3[i]=jianwei3[j];
                jianwei3[j]=tran;

                        }

                    }

                }
            }
        }

    for(i=1;i<n*(n-1)/2+1;i++){
             printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",(int)jiawei1[i],(int)jiawei2[i],(int)jiawei3[i],(int)jianwei1[i],(int)jianwei2[i],(int)jianwei3[i],k[i]);
    }
    return 0;
}


/*
 *  Name:distance.cpp
 *
 *  Created on: 2012-11-05
 *  Author: ??
 *  Function?????
 */

int main()
{
	int n, i, j, count, temp=0;
	float sum;
	cin >> n;
	count=n*(n-1)/2;
	int point[3][n];
	float distance[count];
	float distance_temp;
	int ptp[2][count], ptp_temp;
	for (i=0;i<n;i++){
		for (j=0;j<3;j++){
			cin >> point[j][i];
		}
	}
	for (i=0;i<n-1;i++){
		for (j=i+1;j<n;j++){
			sum=(float)(point[0][i]-point[0][j])*(point[0][i]-point[0][j])+(point[1][i]-point[1][j])*(point[1][i]-point[1][j])+(point[2][i]-point[2][j])*(point[2][i]-point[2][j]);
			distance[temp]=sqrt(sum);
			ptp[0][temp]=i;
			ptp[1][temp]=j;
			temp++;
		}
	}
	for (i=0;i<count-1;i++){
		for (j=0;j<count-1-i;j++){
			if (distance[j]<distance[j+1]){
				distance_temp=distance[j];
				distance[j]=distance[j+1];
				distance[j+1]=distance_temp;
				ptp_temp=ptp[0][j+1];
				ptp[0][j+1]=ptp[0][j];
				ptp[0][j]=ptp_temp;
				ptp_temp=ptp[1][j+1];
				ptp[1][j+1]=ptp[1][j];
				ptp[1][j]=ptp_temp;
			}
		}
	}
	for (i=0;i<count;i++){
		cout << '(' << point[0][ptp[0][i]] << ',' << point[1][ptp[0][i]] << ',' << point[2][ptp[0][i]] << ")-(";
		cout << point[0][ptp[1][i]] << ',' << point[1][ptp[1][i]] << ',' << point[2][ptp[1][i]] << ")=";
		cout << fixed << setprecision(2) << distance[i] << endl;
	}
	return 0;
}


typedef struct point{
    int x, y, z;
} P;

typedef struct len{
    double real;
    P *a, *b;
} L;

P points[10];
L len[1000];
int lencount=0;

int cmp(const void *a, const void *b){
    double k;
    L *aa=(L*)a, *bb=(L*)b;
    if((k=aa->real - bb->real)) return k<0;
    return aa->a - bb->a;
}
int main()
{
    int n, i, j;
    double tmp;
    scanf("%d", &n);
    for(i=0; i<n; i++){
        scanf("%d", &(points[i].x));
        scanf("%d", &(points[i].y));
        scanf("%d", &(points[i].z));
    }
    for(i=0; i<n-1; i++){
        for(j=i+1; j<n; j++){
            tmp=0;
            tmp+=pow(points[i].x-points[j].x, 2);
            tmp+=pow(points[i].y-points[j].y, 2);
            tmp+=pow(points[i].z-points[j].z, 2);
            len[lencount].real=pow(tmp, 0.5);
            len[lencount].a=&points[i];
            len[lencount].b=&points[j];
            lencount++;
        }
    }
    qsort(len, lencount, sizeof(L), cmp);
    for(i=0; i<lencount; i++){
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",
        (len[i].a)->x, (len[i].a)->y, (len[i].a)->z,
        (len[i].b)->x, (len[i].b)->y, (len[i].b)->z,
        len[i].real);
    }

    return 0;
}


//????????
struct point{
		int x;
		int y;
		int z;
	}input[10]={0};
struct point u;
struct point v;
struct total{
	struct point u;
	struct point v;
	double result;
	}output[45]={0};
//???????????
double distance(struct point a,struct point b)
{
	return(sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)+(a.z-b.z)*(a.z-b.z)));
}
void sort(struct total c[],int d)
{
	int m,n;
	struct total temp;
	for(m=1;m<d;m++)
		for(n=0;n<d-m;n++)
			if(c[n].result<c[n+1].result){
				temp=c[n];
				c[n]=c[n+1];
				c[n+1]=temp;
			}
}
//???
void main()
{
	int n,i,j,p;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d%d%d",&input[i].x,&input[i].y,&input[i].z);
	p=-1;
	for(i=0;i<n-1;i++){
		for(j=i+1;j<n;j++){
			p++;
			output[p].u=input[i];
			output[p].v=input[j];
			output[p].result=distance(output[p].u,output[p].v);
		}
	}
	sort(output,p+1);
	for(i=0;i<=p;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",output[i].u.x,output[i].u.y,output[i].u.z,output[i].v.x,output[i].v.y,output[i].v.z,output[i].result);
}


typedef struct point {
    int x,y,z;
}POINT;

typedef struct disdence {
    POINT a,b;
    double dst;
}PD;

double Squ(double num) {
    return num * num;
}

double Distance(POINT a,POINT b) {
    return sqrt(Squ(a.x - b.x) + Squ(a.y - b.y) + Squ(a.z - b.z));
}

int main() {
    POINT pt[10];
    PD tmp,dst[45];
    int i,j,k,n,N;
    //printf("???? : ");
    scanf("%d",&n);
    if(n > 10) n = 10;
    N = n*(n - 1)/2;
    for(i = 0;i < n;i++) {
        //printf("?%d : ",i + 1);
        scanf("%d %d %d",&pt[i].x,&pt[i].y,&pt[i].z);
    }
    k = 0;
    for(i = 0;i < n - 1;i++) {  /*???????*/
        for(j = i + 1;j < n;j++) {
            dst[k].a = pt[i];
            dst[k].b = pt[j];
            dst[k].dst = Distance(pt[i],pt[j]);
            k++;
        }
    }
	for(i = 0;i < N- 1;i++)
		for(j = 0;j < N -i -1;j++ )
			if(dst[j].dst < dst[j + 1].dst){
				tmp = dst[j];
				dst[j] = dst[j +1];
				dst[j + 1] = tmp;
			}

	//cout << N << endl;
      /* for(i = 0;i < N - 1;i++) {//?????????
        k = i;
        for(j = i + 1;j < N;j++) {
            if(dst[k].dst <= dst[j].dst)
                k = j;
        }
        if(k != i) {
            tmp = dst[k];
            dst[k] = dst[i];
            dst[i] = tmp;
        }
    }*/

    for(i = 0; i < N; i++) {
        printf("(%d,%d,%d)-",dst[i].a.x,dst[i].a.y,dst[i].a.z);
        printf("(%d,%d,%d)=",dst[i].b.x,dst[i].b.y,dst[i].b.z);
        printf("%.2lf\n",dst[i].dst);
    }
       return 0;
}


int main()
{
	struct address
	{
		int x;
	    int y;
		int z;
	}point[10];
	int n,i,j,k;
	double d[45],t;
	cin>>n;
	for(i=0;i<n;i++)
		cin>>point[i].x>>point[i].y>>point[i].z;
	for(i=0;i<n-1;i++)
	{
		for(j=i+1;j<n;j++)
			d[(2*n-1-i)*i/2+j-i-1]=sqrt((point[i].x-point[j].x)*(point[i].x-point[j].x)+(point[i].y-point[j].y)*(point[i].y-point[j].y)+(point[i].z-point[j].z)*(point[i].z-point[j].z));
	}
	for(i=0;i<n*(n-1)/2-1;i++)
	{
		for(j=i+1;j<n*(n-1)/2;j++)
		{
			if(d[j]>d[i])
			{t=d[i];d[i]=d[j];d[j]=t;}
		}
	}
	for(i=0;i<n*(n-1)/2;)
	{
		for(j=0;j<n-1;j++)
		{
			for(k=j+1;k<n;k++)
			{
				if(sqrt((point[k].x-point[j].x)*(point[k].x-point[j].x)+(point[k].y-point[j].y)*(point[k].y-point[j].y)+(point[k].z-point[j].z)*(point[k].z-point[j].z))==d[i])
                {cout<<"("<<point[j].x<<","<<point[j].y<<","<<point[j].z<<")-("<<point[k].x<<","<<point[k].y<<","<<point[k].z<<")=";
				 cout<<(fixed)<<setprecision(2)<<d[i]<<endl;}
			}
		}
		for(j=i+1;j<n*(n-1)/2;j++)
		{
			if(d[j]!=d[i]) break;
		}
		i=j;
	}
	return 0;
}