semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int a,c,k,i,m,j,n,x[101],y[101],z[101],xs[101],ys[101],zs[101],xz[101],yz[101],zz[101];
	double b,l[10][10],ls[100];
	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++){
			l[i][j]=sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])+(z[i]-z[j])*(z[i]-z[j]));
		}
	}
	a=0;
	 for(i=0;i<n;i++){
  		for(j=i+1;j<n;j++){
  			xs[a]=x[i];
  			ys[a]=y[i];
  			zs[a]=z[i];
  			xz[a]=x[j];
  			yz[a]=y[j];
  			zz[a]=z[j];
  			ls[a]=l[i][j];
  			a++;
  			m=a;
  		}
	 }
	  k=0;
 while(k<=m){
  	for(i=0;i<m-1;i++){
  		if(ls[i]>=ls[i+1]){
  		ls[i]=ls[i];
  		ls[i+1]=ls[i+1];
  		}else{
  		b=ls[i];
  		ls[i]=ls[i+1];
  		ls[i+1]=b;
  		c=xs[i];
  		xs[i]=xs[i+1];
  		xs[i+1]=c;
  		c=ys[i];
  		ys[i]=ys[i+1];
  		ys[i+1]=c;
  		c=zs[i];
  		zs[i]=zs[i+1];
  		zs[i+1]=c;
  		c=xz[i];
  		xz[i]=xz[i+1];
  		xz[i+1]=c;
  		c=yz[i];
  		yz[i]=yz[i+1];
  		yz[i+1]=c;
  		c=zz[i];
  		zz[i]=zz[i+1];
  		zz[i+1]=c;
  		}
  	}
  	k++;
 } 
 for(i=0;i<m;i++){
 	 printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",xs[i],ys[i],zs[i],xz[i],yz[i],zz[i],ls[i]);
 }
 return 0;
}
int main(){
  int shu[10][3],i,j,n,a;
  double d[1000],e;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d %d %d",&shu[i][0],&shu[i][1],&shu[i][2]);
  } 
  for(i=0;i<n;i++){
	  for(j=i+1;j<n;j++){
         d[10*i+j]=0;
	  }
  }
  for(i=0;i<n;i++){
	  for(j=i+1;j<n;j++){
		  a=(shu[i][0]-shu[j][0])*(shu[i][0]-shu[j][0])+(shu[i][1]-shu[j][1])*(shu[i][1]-shu[j][1])+(shu[i][2]-shu[j][2])*(shu[i][2]-shu[j][2]);
        d[10*i+j]=sqrt(a);
	  }
  }
  while(1){
  e=0;
  for(i=0;i<n;i++){
	  for(j=i+1;j<n;j++){
		  if(d[10*i+j]>e){
		  e=d[10*i+j];
		  }
	  }
  }
  if(e==0){
  break;
  }
   for(i=0;i<n;i++){
	  for(j=i+1;j<n;j++){
		  if(d[10*i+j]==e){
	  
  
	  printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",shu[i][0],shu[i][1],shu[i][2],shu[j][0],shu[j][1],shu[j][2],e);
	  d[10*i+j]=0;
  }}}
  }
	  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;
}
struct zuobiao
{
	int x ;
	int y ;
	int z ;	
}s[10] ;      //??xyz?????? 
double d[100] , temp ; //d?????????? 
int qian[100] , hou[100] , temp1 ;    //qian hou ????????????????????? 
int i , j , k = 0 ;

void dis(int , int) ;
void paixu() ;

int main()
{
	int n ;
	cin >> n ;
	for (i = 0 ; i < n ; i++)
		cin >> s[i].x >> s[i].y >> s[i].z ;
	for (i = 0 ; i < n ; i++)
		for (j = i + 1 ; j < n ; j++)
			dis(i , j) ;
	paixu() ;
	for (i = 0 ; i < k ; i++)
	{
		cout << "(" << s[qian[i]].x << "," << s[qian[i]].y << "," << s[qian[i]].z << ")" << "-"
			 <<	"(" << s[hou[i]].x << "," << s[hou[i]].y << "," << s[hou[i]].z << ")" << "=" ;
		printf ("%.2f", d[i]) ;
		cout << endl ;
	}
	return 0 ;
}

void dis(int a , int b)
{
	int a1 , a2 , a3 ;
	a1 = s[a].x	- s[b].x ;
	a2 = s[a].y	- s[b].y ;
	a3 = s[a].z	- s[b].z ;
	d[k] = sqrt(a1 * a1 + a2 * a2 + a3 * a3) ;  //???? 
	qian[k] = a ;    //?k?????????? 
	hou[k] = b ;	//?k??????????
	k++ ;
}

void paixu()
{
	for (i = 0 ; i < k - 1 ; i++)
		for (j = i + 1 ; j < k ; j++)
		{
			if (d[i] < d[j])
			{
				temp = d[i] ;       //???????????qian hou???? 
				d[i] = d[j]	;
				d[j] = temp ;
				temp1 = qian[i] ;
				qian[i] = qian[j] ;
				qian[j] = temp1 ;
				temp1 = hou[i] ;
				hou[i] = hou[j]	;
				hou[j] = temp1 ;
			}
			else if (d[i] == d[j])  //???????qian hou?????????? 
				if (qian[i] > qian[j] || (qian[i] == qian[j] && hou[i] > hou[j]))
				{
					temp = d[i] ;
					d[i] = d[j]	;
					d[j] = temp ;
					temp1 = qian[i] ;
					qian[i] = qian[j] ;
					qian[j] = temp1 ;
					temp1 = hou[i] ;
					hou[i] = hou[j]	;
					hou[j] = temp1 ;
				}
		}
}
struct point
{
	int x;
	int y;
	int z;
};

struct dist
{
	struct point *p1;
	struct point *p2;
	double l;
};

void sort(struct dist a[], int n)
{
	int i,j;
	struct dist t;
	for(i=0;i<n-1;i++)
		for(j=n;j>i;j--)
			if(a[j].l>a[j-1].l)
			{
				t=a[j];a[j]=a[j-1];a[j-1]=t;
			}
}

void main()
{
	struct point p[10];
	struct dist d[50];
	int n,i,j,c=0;
	
	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-1;i++)
		for(j=i+1;j<n;j++)
		{
			d[c].p1=&p[i];
			d[c].p2=&p[j];
			d[c].l=sqrt((p[i].x-p[j].x)*(p[i].x-p[j].x)+(p[i].y-p[j].y)*(p[i].y-p[j].y)+(p[i].z-p[j].z)*(p[i].z-p[j].z));
			c++;
		}
	sort(d,c);
	for(i=0;i<c;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.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].l);
}
int main()
{
	int n,i,j=0,k=0,len,sum=0;
	double di[100],l;
	struct i{
		int x,y,z;
	}a[100],b[100],c[100],e;
	scanf("%d",&n);
	for(i=0;i<n;i++)	
		scanf("%d%d%d",&a[i].x,&a[i].y,&a[i].z);
      for(i=0;i<n;i++)
	  {
        for(j=i+1;j<n;j++)
		{
			di[k]=sqrt(1.0*(a[i].x-a[j].x)*(a[i].x-a[j].x)+1.0*(a[i].y-a[j].y)*(a[i].y-a[j].y)+1.0*(a[i].z-a[j].z)*(a[i].z-a[j].z));
             b[k]=a[i];
			 c[k]=a[j];
			 k++;
		}
	  }
	  for(i=1;i<=k;i++)
	  {
		  for(j=0;j<k-i;j++)
		  {
			  if(di[j]<di[j+1])
			  {
				  l=di[j];
				  di[j]=di[j+1];
				  di[j+1]=l;
                   e=b[j];
				  b[j]=b[j+1];
				  b[j+1]=e;
				  e=c[j];
				  c[j]=c[j+1];
				  c[j+1]=e;
			  }
		  }
	  }
	  for(i=0;i<k;i++)
	  {
		  printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",b[i].x,b[i].y,b[i].z,c[i].x,c[i].y,c[i].z,di[i]);
	  }
	return 0;
}
int main()
{
    struct position
    {int x1;
     int x2;
     int x3;
     }pos[10];
    struct distance
    {int x;
     int y;
     float distan;
     }dis[60],temp;//x??????y??????distan???
     int n,i,j,k;
     cin>>n;
     for(i=0;i<n;i++)
       {cin>>pos[i].x1;
        cin>>pos[i].x2;
        cin>>pos[i].x3;
        }//????
     k=0;
     for(i=0;i<n;i++)
       {for(j=i+1;j<n;j++)
          {dis[k].x=i;
           dis[k].y=j;
           dis[k].distan=sqrt((pos[i].x1-pos[j].x1)*(pos[i].x1-pos[j].x1)+(pos[i].x2-pos[j].x2)*(pos[i].x2-pos[j].x2)+(pos[i].x3-pos[j].x3)*(pos[i].x3-pos[j].x3));
           k++;}//????????????x,y,?????
       }
     for(i=0;i<k;i++)
       {for(j=0;j<k-1-i;j++)
          {if(dis[j].distan<dis[j+1].distan)
             {temp=dis[j];
              dis[j]=dis[j+1];
              dis[j+1]=temp;
              }//??????????????
          }
       }
       for(i=0;i<k;i++)
         cout<<"("<<pos[dis[i].x].x1<<","<<pos[dis[i].x].x2<<","<<pos[dis[i].x].x3<<")-("<<pos[dis[i].y].x1<<","<<pos[dis[i].y].x2<<","<<pos[dis[i].y].x3<<")="<<fixed<<setprecision(2)<<dis[i].distan<<endl;//?????
       return 0;
}
int main()
struct d{
	int x;
	int y;
	int z;};
{
	struct d s[10];
	int n,i,j,k=0,d;
	int x,y,z,b[45],c[45];
	double a[45],temp;
	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++)
		{   x=s[i].x-s[j].x;
	        y=s[i].y-s[j].y;
			z=s[i].z-s[j].z;
			a[k]=(x*x+y*y+z*z);
			a[k]=sqrt(a[k]);
			b[k]=i;
			c[k]=j;
	        k++;
	     }
	for(i=0;i<k;i++)
		for(j=i+1;j<k;j++)
		{if((a[i]<a[j])||((a[i]==a[j])&&(b[i]>b[j]))||((a[i]==a[j])&&(c[i]>c[j])))
		{temp=a[j];
	     a[j]=a[i];
		 a[i]=temp;
		 temp=b[j];
	     b[j]=b[i];
		 b[i]=temp;
		 temp=c[j];
	     c[j]=c[i];
		 c[i]=temp;
	    }
		}
	for(i=0;i<k;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",s[b[i]].x,s[b[i]].y,s[b[i]].z,s[c[i]].x,s[c[i]].y,s[c[i]].z,a[i]);
	scanf("%d",&d);
	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;
}
unsigned int com[45][2];
float dis[45];
void swap(int i,int j)
{
unsigned int t_1[2];
float t_2;
t_2=dis[i];
dis[i]=dis[j];
dis[j]=t_2;
t_1[0]=com[i][0];
com[i][0]=com[j][0];
com[j][0]=t_1[0];
t_1[1]=com[i][1];
com[i][1]=com[j][1];
com[j][1]=t_1[1];
}
int main(void)
{

int i,j,n,s=0,coord[10][3];
for(i=0;i<45;i++)
dis[i]=0;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d %d %d ",&coord[i][0],&coord[i][1],&coord[i][2]);
for(i=0;i<n;i++)
for(j=i+1;j<n;j++)
{
com[s][0]=i;
com[s][1]=j;
dis[s]=sqrt(pow(coord[i][0]-coord[j][0],2)+pow(coord[i][1]-coord[j][1],2)+pow(coord[i][2]-coord[j][2],2));
s++;
}
for(i=s;i>0;i--)
for(j=0;j<i-1;j++)
if(dis[j]<dis[j+1])
swap(j,j+1);
for(i=0;i<s;i++)
printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",coord[com[i][0]][0],coord[com[i][0]][1],coord[com[i][0]][2],coord[com[i][1]][0],coord[com[i][1]][1],coord[com[i][1]][2],dis[i]);
fclose(stdin);
return 0;
}
struct point{
	int a;
	int b;
	int c;
}p[10];
struct dis{
	double d;
	int i;
	int j;
}di[60],x;
int main()
{int k,m,q,n,y;
double z;
scanf("%d",&n);
for(k=0;k<n;k++)
	scanf("%d%d%d",&p[k].a,&p[k].b,&p[k].c);

k=0;
for(m=0;m<n;m++)
{q=m+1;
for(;q<n;q++)
{z=((double)p[q].a-(double)p[m].a)*((double)p[q].a-(double)p[m].a)+((double)p[q].b-(double)p[m].b)*((double)p[q].b-(double)p[m].b)+((double)p[q].c-(double)p[m].c)*((double)p[q].c-(double)p[m].c);

di[k].d=(double)sqrt((double)z);
di[k].i=m;
di[k].j=q;
k=k+1;}}
for(y=0;y<n*(n-1)/2-1;y++)
{for(k=0;k<n*(n-1)/2;k++){if(di[k+1].d>di[k].d)
{x=di[k];
di[k]=di[k+1];
di[k+1]=x;}}}
for(k=0;k<n*(n-1)/2;k++)
{printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",p[di[k].i].a,p[di[k].i].b,p[di[k].i].c,p[di[k].j].a,p[di[k].j].b,p[di[k].j].c,di[k].d);}
}
int main()
{
    int x[100][30],i,j,k=0,m,n,p;
    double s[1000],a;
    scanf("%d",&n);
    m=n*(n-1)/2;
    for(i=0;i<n;i++){
        for(j=0;j<3;j++){
            scanf("%d",&x[i][j]);
        }
    }
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            s[k]=sqrt((pow(x[i][0]-x[j][0],2)+pow(x[i][1]-x[j][1],2)+pow(x[i][2]-x[j][2],2))*1.0);
            k++;
        }
    }
    for(i=1;i<k;i++){
        for(j=0;j<k-i;j++){
            if(s[j]>s[j+1]){
                a=s[j];
                s[j]=s[j+1];
                s[j+1]=a;
            }
        }
    }
    for(p=k-1;p>=0;p--){
        for(i=0;i<n;i++){
            for(j=i+1;j<n;j++){
                if(s[p]!=s[p+1]){
                    if(sqrt((pow(x[i][0]-x[j][0],2)+pow(x[i][1]-x[j][1],2)+pow(x[i][2]-x[j][2],2))*1.0)==s[p])
                    {printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[i][0],x[i][1],x[i][2],x[j][0],x[j][1],x[j][2],s[p]);}
                }
            }
        }
    }
    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 syz[10][3];
int i,j,n,d,y,k,r=0;
double result,sy[45];
scanf("%d",&n);
for(i=0;i<n;i++)
  {
    for(j=0;j<3;j++)
      {
        scanf("%d",&syz[i][j]);
       }
  }
for(i=0;i<n-1;i++)
   {
     for(k=i+1;k<n;k++)
       {
    result=sqrt(1.0*(syz[k][0]-syz[i][0])*(syz[k][0]-syz[i][0])+1.0*(syz[k][1]-syz[i][1])*(syz[k][1]-syz[i][1])+1.0*(syz[k][2]-syz[i][2])*(syz[k][2]-syz[i][2]));
     sy[r]=result;
       r++;
       }
    } 
  /*
  ?????sy???double???????e????double?? 
      int e;
      */
      double e;
   for(d=1;d<=n*(n-1)/2;d++)
      {
     for(y=0;y<n*(n-1)/2-d;y++)
         {
           if(sy[y]<=sy[y+1])
            {
            e=sy[y];
            sy[y]=sy[y+1];
            sy[y+1]=e;
             }
          }
      }
      /* 
for(i=1,k=1;j<n*(n-1)/2;i++)
??????????i?????? 
*/
for(i=1,k=1;i<n*(n-1)/2;i++)
  {
   for(j=0;j<k;j++)
      {
  /*
  ????????==????????????? 
      if(sy[i]==sy[j])
  */
    if(fabs(sy[i]-sy[j]) < 0.000001)
        {
      break;
        }
        }
    if(j==k)
     {
    sy[k]=sy[i];
     k++;
     }
     }    
  /*
  ???k???????????????? 
for(y=0;y<k;y++)
*/
int kk = k;
for(y=0;y<kk;y++)
      {
      for(i=0;i<n-1;i++)
        {
        for(k=i+1;k<n;k++)
          {
          /*
          ????????????????????                
          if(sqrt(1.0*(syz[k][0]-syz[i][0])*(syz[k][0]-syz[i][0])+1.0*(syz[k][1]-syz[i][1])*(syz[k][1]-syz[i][1])+1.0*(syz[k][2]-syz[i][2])*(syz[k][2]-syz[i][2]))==sy[y])
          */
          if(fabs(sqrt(1.0*(syz[k][0]-syz[i][0])*(syz[k][0]-syz[i][0])+1.0*(syz[k][1]-syz[i][1])*(syz[k][1]-syz[i][1])+1.0*(syz[k][2]-syz[i][2])*(syz[k][2]-syz[i][2]))-sy[y])<0.00001) 
            {
          printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",syz[i][0],syz[i][1],syz[i][2],syz[k][0],syz[k][1],syz[k][2],sy[y]);
             }
            }
           }
          }

return 0;
}
int main()
{
	int n,i,j,k,p=0,q,r,e;
	cin>>n;
	float s,m1,m2,m3,m4,m5,m6,f,g;
	float l[50];//??
	float x[10];
	float y[10];
	float z[10];//??
	float a1[50][2];
	float a2[50][2];
	float a3[50][2];
	float b1[50][2];
	float b2[50][2];
	float b3[50][2];//????????
	for(i=0;i<n;i++)
		cin>>x[i]>>y[i]>>z[i];//??
	for(j=0;j<n-1;j++)
	{
		for(k=j+1;k<n;k++)
		{
			l[p]=sqrt((x[j]-x[k])*(x[j]-x[k])+(y[j]-y[k])*(y[j]-y[k])+(z[j]-z[k])*(z[j]-z[k]));
			a1[p][0]=x[j];a2[p][0]=y[j];a3[p][0]=z[j];b1[p][0]=x[k];b2[p][0]=y[k];b3[p][0]=z[k];
			a1[p][1]=j;a2[p][1]=j;a3[p][1]=j;b1[p][1]=k;b2[p][1]=k;b3[p][1]=k;
			p=p+1;
		}//????????
	}
	for(q=0;q<p-1;q++)
	{
		for(r=q+1;r<p;r++)
		{
			if(l[q]<l[r])
			{
				s=l[q];
				l[q]=l[r];
				l[r]=s;
				f=a1[q][1];
				a1[q][1]=a1[r][1];
				a1[r][1]=f;
				g=b1[q][1];
				b1[q][1]=b1[r][1];
				b1[r][1]=g;
				m1=a1[q][0];
				a1[q][0]=a1[r][0];
				a1[r][0]=m1;
				m2=a2[q][0];
				a2[q][0]=a2[r][0];
				a2[r][0]=m2;
				m3=a3[q][0];
				a3[q][0]=a3[r][0];
				a3[r][0]=m3;
				m4=b1[q][0];
				b1[q][0]=b1[r][0];
				b1[r][0]=m4;
				m5=b2[q][0];
				b2[q][0]=b2[r][0];
				b2[r][0]=m5;
				m6=b3[q][0];
				b3[q][0]=b3[r][0];
				b3[r][0]=m6;
			}//??????
			if(l[q]==l[r]&&a1[q][1]>=a1[r][1])
			{
				f=a1[q][1];
				a1[q][1]=a1[r][1];
				a1[r][1]=f;
				g=b1[q][1];
				b1[q][1]=b1[r][1];
				b1[r][1]=g;
				m1=a1[q][0];
				m1=a1[q][0];
				a1[q][0]=a1[r][0];
				a1[r][0]=m1;
				m2=a2[q][0];
				a2[q][0]=a2[r][0];
				a2[r][0]=m2;
				m3=a3[q][0];
				a3[q][0]=a3[r][0];
				a3[r][0]=m3;
				m4=b1[q][0];
				b1[q][0]=b1[r][0];
				b1[r][0]=m4;
				m5=b2[q][0];
				b2[q][0]=b2[r][0];
				b2[r][0]=m5;
				m6=b3[q][0];
				b3[q][0]=b3[r][0];
				b3[r][0]=m6;
			}
			if(l[q]==l[r]&&b1[q][1]>=b1[r][1])
			{
				f=a1[q][1];
				a1[q][1]=a1[r][1];
				a1[r][1]=f;
				g=b1[q][1];
				b1[q][1]=b1[r][1];
				b1[r][1]=g;
				m1=a1[q][0];
				m1=a1[q][0];
				a1[q][0]=a1[r][0];
				a1[r][0]=m1;
				m2=a2[q][0];
				a2[q][0]=a2[r][0];
				a2[r][0]=m2;
				m3=a3[q][0];
				a3[q][0]=a3[r][0];
				a3[r][0]=m3;
				m4=b1[q][0];
				b1[q][0]=b1[r][0];
				b1[r][0]=m4;
				m5=b2[q][0];
				b2[q][0]=b2[r][0];
				b2[r][0]=m5;
				m6=b3[q][0];
				b3[q][0]=b3[r][0];
				b3[r][0]=m6;}
			//???????????
		}
	}
	for(e=0;e<p;e++)
	{
		cout<<"("<<a1[e][0]<<","<<a2[e][0]<<","<<a3[e][0]<<")-("<<b1[e][0]<<","<<b2[e][0]<<","<<b3[e][0]<<")=";
		printf("%.2f\n",l[e]);//??
	}
	getchar();
	getchar();
	return 0;
}
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 main()
{ 
    int a[11][3],i,j,n,k,c[46],d[46],f;
    double b[46],t;
    cin>>n;
    for(i=1;i<=n;i++)
    {
       cin>>a[i][0]>>a[i][1]>>a[i][2];                               
    }
    k=1;
    for(i=1;i<n;i++)
     for(j=i+1;j<=n;j++)
      {
    b[k]=sqrt(  (a[i][0]-a[j][0])*(a[i][0]-a[j][0])+(a[i][1]-a[j][1])*(a[i][1]-a[j][1])+(a[i][2]-a[j][2])*(a[i][2]-a[j][2]) );
       c[k]=i;
       d[k]=j;
       k++;
      }
   f=n*(n-1)/2;
      for(i=1;i<f;i++)
      for(j=f-1;j>=i;j--)
      {
        if(b[j]<b[j+1])
        {
         t=b[j];
         b[j]=b[j+1];
         b[j+1]=t;
         t=c[j];
         c[j]=c[j+1];
         c[j+1]=t;
         t=d[j];
         d[j]=d[j+1];
         d[j+1]=t;
        }
      }
     for(i=1;i<f;i++)
     cout<<'('<<a[c[i]][0]<<','<<a[c[i]][1]<<','<<a[c[i]][2]<<")-("<<a[d[i]][0]<<','<<a[d[i]][1]<<','<<a[d[i]][2]<<")="<<fixed<<setprecision(2)<<b[i]<<endl;
     cout<<'('<<a[c[f]][0]<<','<<a[c[f]][1]<<','<<a[c[f]][2]<<")-("<<a[d[f]][0]<<','<<a[d[f]][1]<<','<<a[d[f]][2]<<")="<<fixed<<setprecision(2)<<b[f];
return 0;
}
float ju(int *p,int *q){
float s=0;
int i=0;
for(i=0;i<3;i++){
	s=(*(p)-*(q)) * (*(p)-*(q))+s;
p++,q++;}
return s=sqrt(s);}

int main()
{
    struct s{
		int i;
		int j;
		float l;
	}
	s[100],t;
	
	int n,a[11][3]={0},i,j,p=0,k;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d%d",&a[i][0],&a[i][1],&a[i][2]);
	}
	for(i=0;i<n;i++){
		for(j=i+1;j<n;j++){
			s[p].i=i,s[p].j=j,s[p].l=ju(a[i],a[j]),p++;}
	}
	for(i=0;i<p;i++){
		for(j=i+1;j<p;j++){
			if(s[i].l<s[j].l)t=s[i],s[i]=s[j],s[j]=t;
			else if(s[i].l==s[j].l){
			if(s[i].i>s[j].i)t=s[i],s[i]=s[j],s[j]=t;
		    else if(s[i].i==s[j].i&&s[i].j>s[j].j)t=s[i],s[i]=s[j],s[j]=t;
		}
	}
	}

	for(i=0;i<p;i++){
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",a[s[i].i][0],a[s[i].i][1],a[s[i].i][2],a[s[i].j][0],a[s[i].j][1],a[s[i].j][2],s[i].l);}
}
int main()
{
	int n,i,j,r,k=0,a[10][3],c[45],d[45];
	double b[45];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d %d %d",&a[i][0],&a[i][1],&a[i][2]);
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			b[k]=sqrt((a[i][1]-a[j][1])*(a[i][1]-a[j][1])+(a[i][2]-a[j][2])*(a[i][2]-a[j][2])+(a[i][0]-a[j][0])*(a[i][0]-a[j][0]));
			c[k]=i;
			d[k]=j;
			k++;
		}
	}
	for(i=1;i<n*(n-1)/2;i++)
	{
        double tmp=b[i];
		for(j=i-1;j>=0;j--)
		{
			if(tmp>b[j])
			{
				b[j+1]=b[j];
				b[j]=tmp;
				r=c[j];
				c[j]=c[j+1];
				c[j+1]=r;
				r=d[j];
				d[j]=d[j+1];
				d[j+1]=r;
			}
			else
			{
                b[j+1]=tmp;
                break;
            }
		}
	}
	for(k=0;k<n*(n-1)/2;k++)
    {
    printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",a[c[k]][0],a[c[k]][1],a[c[k]][2],a[d[k]][0],a[d[k]][1],a[d[k]][2],b[k]);
    }
	return 0;
}