semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	struct point
	{
		int x,y,z;
	};
	struct point p[10];
	struct distance
	{
		struct point p1;
		struct point p2;
		float dis;
	};
	struct distance d[45];
	struct distance temp;
	int i,n,j,k;
	float pf;
	scanf("%d",&n);
	k=0;
	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[k].p1=p[i];
		d[k].p2=p[j];
		pf=(float)(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);
		d[k].dis=sqrt(pf);
		k++;
		}
	}
	for(i=0;i<n*(n-1)/2-1;i++)
	{
		for(j=0;j<n*(n-1)/2-i;j++)
		{
			if(d[j].dis<d[j+1].dis)
			{
				temp=d[j];
				d[j]=d[j+1];
				d[j+1]=temp;
			}
		}
	}
	for(i=0;i<n*(n-1)/2;i++)
	{
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\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].dis);
	}
	return 0;
}
struct Line
{
	int n1;
	int n2;
	double dis;
};
int main()
{
	double distance(double a[3],double b[3]);
	struct Line l[55];
	double num[10][3],td;
	int n,i,j,k,p,q,t,num1[10][3];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf%lf%lf",&num[i][0],&num[i][1],&num[i][2]);
	}
	k=0;
	for(i=0;i<n-1;i++)
	{
		for(j=i+1;j<n;j++)
		{
			l[k].dis=distance(num[i],num[j]);
			l[k].n1=i;
			l[k].n2=j;
			k++;
		}
	}
	for(q=1;q<k;q++)
	{
		for(p=0;p<k-q;p++)
		{
			if(l[p].dis<l[p+1].dis)
			{
				t=l[p].n1;l[p].n1=l[p+1].n1;l[p+1].n1=t;
				t=l[p].n2;l[p].n2=l[p+1].n2;l[p+1].n2=t;
				td=l[p].dis;l[p].dis=l[p+1].dis;l[p+1].dis=td;
			}
		}
	}
	for(i=0;i<n;i++)
	{
		num1[i][0]=(int)num[i][0];
		num1[i][1]=(int)num[i][1];
		num1[i][2]=(int)num[i][2];
	}
	for(i=0;i<k;i++)
	{
		p=l[i].n1;
		q=l[i].n2;
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",num1[p][0],num1[p][1],num1[p][2],num1[q][0],num1[q][1],num1[q][2],l[i].dis);
	}
	return 0;
}

double distance(double a[3],double b[3])
{
	double m;
	m=sqrt((a[0]-b[0])*(a[0]-b[0])+(a[1]-b[1])*(a[1]-b[1])+(a[2]-b[2])*(a[2]-b[2]));
	return m;
}
struct distance
{
       double length;
       int start;
       int end;
};
main()
{
      int n;
      scanf("%d",&n);
      int point[10][4];
      int i,j;
      struct distance dist[45];
      for (i=0;i<n;i++)
      scanf("%d %d %d",&point[i][1],&point[i][2],&point[i][3]);
      int k=0;
      for (i=0;i<n-1;i++)
        for (j=i+1;j<n;j++)
        {
            dist[k].length=sqrt((point[i][1]-point[j][1])*(point[i][1]-point[j][1])+(point[i][2]-point[j][2])*(point[i][2]-point[j][2])+(point[i][3]-point[j][3])*(point[i][3]-point[j][3]));
            dist[k].start=i;
            dist[k].end=j;
            k++;
        }
      double temp;
      int temp1;
      for (i=0;i<k-1;i++)
         for (j=0;j<k-1-i;j++)
         if (dist[j].length<dist[j+1].length)
         {
             temp=dist[j].length;
             dist[j].length=dist[j+1].length;
             dist[j+1].length=temp;
             temp1=dist[j].start;
             dist[j].start=dist[j+1].start;
             dist[j+1].start=temp1;
             temp1=dist[j].end;
             dist[j].end=dist[j+1].end;
             dist[j+1].end=temp1;
         }
      for (i=0;i<k;i++)
      {
          printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",point[dist[i].start][1],point[dist[i].start][2],point[dist[i].start][3],point[dist[i].end][1],point[dist[i].end][2],point[dist[i].end][3],dist[i].length);
      }
      getchar();getchar();
}
struct dian
{
    int z[6];
    double d;
};
double ju(int x[3],int y[3])
{
    double d;
    d=sqrt((x[0]-y[0])*(x[0]-y[0])+(x[1]-y[1])*(x[1]-y[1])+(x[2]-y[2])*(x[2]-y[2]));
    return d;
}
int main()
{
    int n,i,j,a[20][3],x=0;
    struct dian num[50];
    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-1;i++)
    {
        for(j=i+1;j<n;j++)
        {
            num[x].z[0]=a[i][0];
            num[x].z[1]=a[i][1];
            num[x].z[2]=a[i][2];
            num[x].z[3]=a[j][0];
            num[x].z[4]=a[j][1];
            num[x].z[5]=a[j][2];
            num[x].d=ju(a[i],a[j]);
            x++;
        }
    }
    n=n*(n-1)/2;
    for(i=0;i<n-1;i++)
    {
        for(j=0;j<n-i-1;j++)
        {
            if(num[j].d<num[j+1].d)
            {
                num[49]=num[j+1];
                num[j+1]=num[j];
                num[j]=num[49];
            }
        }
    }
    for(i=0;i<n;i++)
    { 
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",num[i].z[0],num[i].z[1],num[i].z[2],num[i].z[3],num[i].z[4],num[i].z[5],num[i].d);
    }
    return 0;
}
//
//  main.cpp
//  ????
//
//  Created by ???? on 13-11-6.
//  Copyright (c) 2013? ????. All rights reserved.
//

int main()
{
	int a[11][4];
    int k=1;
	float b[100][3];
	//input
	int n;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i][1]>>a[i][2]>>a[i][3];
        
	}
	//end of input
	//the distence into b
	for(int i=1;i<n;i++)
	{
		for(int j=i+1;j<=n;j++)
		{
			
			double dis=  (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][3]-a[j][3])*(a[i][3]-a[j][3]);
			
			b[k][0]=sqrt(dis);
			b[k][1]=i;
			b[k][2]=j;
			k++;
            
		}
    
	}
    //sort
	for(int i=1;i<=k-1;i++)
	{
		for(int j=k-1;j>=i+1;j--)
		{
			if(b[j][0]>b[j-1][0])
			{
				float t0=b[j][0];
				b[j][0]=b[j-1][0];
				b[j-1][0]=t0;
                
				int t1=b[j][1];
				b[j][1]=b[j-1][1];
				b[j-1][1]=t1;
                
				int t2=b[j][2];
				b[j][2]=b[j-1][2];
				b[j-1][2]=t2;
                
			}
		}
	}
    //cout<<b[1][0]<<' '<<b[2][0]<<endl;
	//cout
	for(int j=1;j<=k-1;j++)
	{
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",a[ (int)b[j][1] ][1],a[ (int)b[j][1] ][2],a[ (int)b[j][1] ][3],
                                              a[ (int)b[j][2] ][1],a[ (int)b[j][2] ][2],a[ (int)b[j][2] ][3],
                                              b[j][0]);
	}
	
	return 0;
    
}
int main()
{
	struct jl
	{int a1;int b1;int c1;int a2;int b2;int c2;float d;}hz[100],t;
	int n,i,j,a[10],b[10],c[10],k=0;
	double w;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d%d%d",&a[i],&b[i],&c[i]);
	for(i=0;i<n-1;i++)
	{
		for(j=i+1;j<n;j++)
		{
			w=sqrt((a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j])+(c[i]-c[j])*(c[i]-c[j]));
			hz[k].a1=a[i];hz[k].b1=b[i];hz[k].c1=c[i];
			hz[k].a2=a[j];hz[k].b2=b[j];hz[k].c2=c[j];
			hz[k].d=w;
			k++;
		}
	}
	if(k==1)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",a[0],b[0],c[0],a[1],b[1],c[1],w);
	else
	{
		for(i=0;i<k-1;i++)
		for(j=0;j<k-i-1;j++)
		{
			if(hz[j].d<hz[j+1].d)
			{
				t=hz[j];
				hz[j]=hz[j+1];
				hz[j+1]=t;
			}
		}
		for(i=0;i<k;i++)
			printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",hz[i].a1,hz[i].b1,hz[i].c1,hz[i].a2,hz[i].b2,hz[i].c2,hz[i].d);
	}
	return 0;
}
/*
 * julipaixu.cpp
 * ??:??????????n??????
 *  Created on: 2012-11-7
 *      Author: ???
 */



int main()
{
	int n,i=0,j=0,k=0;     //????,n??????
	double t1,d;         //????????
	int t2,t3;            //????????
	cin>>n;            //??n
	int point[3][n], num[2][n*(n-1)/2];//??????point,num??????????
	double distance [n*(n-1)/2];//??????distance,??????
	for(i=0;i<n;i++)           //??????
		cin>>point[0][i]>>point[1][i]>>point[2][i];
	for(i=0;i<n-1;i++)          //????,????????,????????
		for(j=i+1;j<n;j++)
			{
			d=(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[k]=sqrt(d);
			num[0][k]=i;
			num[1][k]=j;
	         k++;
			}
	for(j=1;j<n*(n-1)/2;j++)    //????????????,?????num?????
		for(i=0;i<(n*(n-1)/2)-j;i++)
			if(distance[i]<distance[i+1])
			{
				t1=distance[i+1];
			    distance[i+1]=distance[i];
			    distance[i]=t1;
			    t2=num[0][i+1];
			    num[0][i+1]=num[0][i];
			    num[0][i]=t2;
			    t3=num[1][i+1];
			    num[1][i+1]=num[1][i];
			    num[1][i]=t3;
			}
	for(k=0;k<n*(n-1)/2;k++) //?????????
		{
		i=num[0][k];
	    j=num[1][k];
		cout<<'('<<point[0][i]<<','<<point[1][i]<<','<<point[2][i]<<")-("
			<<point[0][j]<<','<<point[1][j]<<','<<point[2][j]<<")="
			<<fixed<<setprecision(2)<<distance[k]<<endl;
		}
		return 0;
}
int main(){

int n,i,j,k=0,Nline,dx,dy,dz;
scanf("%d",&n);     //??????

struct Dot{
int x,y,z;
} dots[n];          //????,????????

Nline=n*(n-1)/2;      //??????(????????)

for(i=0;i<n;i++)
{
    scanf("%d %d %d",&dots[i].x,&dots[i].y,&dots[i].z);    //??????
}

struct Line{
int x1,y1,z1;
int x2,y2,z2;
float dist;
} lines[Nline],temp;        //???????????-???????????

for(i=0;i<n;i++){           //??????
    for(j=(i+1);j<n;j++)
    {
        lines[k].x1=dots[i].x;
        lines[k].y1=dots[i].y;
        lines[k].z1=dots[i].z;
        lines[k].x2=dots[j].x;
        lines[k].y2=dots[j].y;
        lines[k].z2=dots[j].z;

        dx=lines[k].x1-lines[k].x2;
        dy=lines[k].y1-lines[k].y2;
        dz=lines[k].z1-lines[k].z2;
        lines[k].dist=sqrt(dx*dx+dy*dy+dz*dz);

        k++;
    }
}


for(i=0;i<Nline-1;i++)//??Nline?
{
    for(j=0;j<Nline-i;j++)
    {
        if(lines[j].dist<lines[j+1].dist)
        {
            temp=lines[j];
            lines[j]=lines[j+1];
            lines[j+1]=temp;
        }
    }
}

for(i=0;i<Nline;i++)
{
  printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",lines[i].x1,lines[i].y1,lines[i].z1,lines[i].x2,lines[i].y2,lines[i].z2,lines[i].dist);
 // printf("%d",i);
}





return 0;
}
struct dot{
	int x;
	int y;
	int z;
}dots[10];
struct dist{
	int d1;
	int d2;
	float dis;
}dists[45];
int cmp(const void *p1,const void *p2)
{
	struct dist l1,l2;
	l1=*(struct dist *)p1;
	l2=*(struct dist *)p2;
	if(l1.dis>l2.dis)
	{
		return -1;
	}else if(l1.dis<l2.dis)
	{
		return 1;
	}else{
		if(l1.d1!=l2.d1)
		{
			return l1.d1-l2.d1;
		}else{
			return l1.d2-l2.d2;
		}
	}
	return 0;
}
int main()
{
	int n,i,j,t=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)scanf("%d%d%d",&dots[i].x,&dots[i].y,&dots[i].z);
	for(i=0;i<n-1;i++)
	{
		for(j=i+1;j<n;j++)
		{
			dists[t].d1=i;
			dists[t].d2=j;
			dists[t].dis=sqrt((dots[i].x-dots[j].x)*(dots[i].x-dots[j].x)+(dots[i].y-dots[j].y)*(dots[i].y-dots[j].y)+(dots[i].z-dots[j].z)*(dots[i].z-dots[j].z));
			t++;
		}
	}
	qsort(&dists[0],t,sizeof(struct dist),cmp);
	for(i=0;i<t;i++)printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",dots[dists[i].d1].x,dots[dists[i].d1].y,dots[dists[i].d1].z,dots[dists[i].d2].x,dots[dists[i].d2].y,dots[dists[i].d2].z,dists[i].dis);
	return 0;
}
struct zuhe {
	int a[3];
	int b[3];
	double m;
};
int main()
{    struct zuhe z[50];
     struct zuhe b;
     int l,i,j,n,m,k=0;
	 int s[100][4];
	 scanf("%d",&n);
	 for(i=0;i<n;i++){
		 for(j=0;j<3;j++)
			 scanf("%d",&s[i][j]);
	 }
	 for(i=0;i<n-1;i++){
		 for(j=i+1;j<n;j++){
			 for(l=0;l<3;l++){
			 z[k].a[l]=s[i][l];
			 z[k].b[l]=s[j][l];	
			 }
           z[k].m=pow((s[i][0]-s[j][0])*(s[i][0]-s[j][0])+(s[i][1]-s[j][1])*(s[i][1]-s[j][1])+(s[i][2]-s[j][2])*(s[i][2]-s[j][2]),0.5);
		       k=k+1;
		 }
	 }
	 for(i=1;i<n*(n-1)/2;i++){
		 for(j=0;j<n*(n-1)/2-i;j++){
			 if(z[j].m<z[j+1].m){
				 b=z[j];
				 z[j]=z[j+1];
				 z[j+1]=b;
			 }
		 }
	 }
	 for(i=0;i<n*(n-1)/2;i++)
		 printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",z[i].a[0],z[i].a[1],z[i].a[2],z[i].b[0],z[i].b[1],z[i].b[2],z[i].m);
	
	 return 0;
}
const double EPS=1e-6;
int main()
{  
	int a[10][3],c[50],n,z=0;
cin>>n;
for(int i=0;i<50;++i)
{c[i]=i;}
for(int i=0;i<n;++i)
{cin>>a[i][0]>>a[i][1]>>a[i][2];}
struct MyStruct
{
	double d;
	int x;
	int y;
}b[50];
for(int i=0;i<n;++i)
	for(int j=i+1;j<n;++j)
	{
		b[z].d =floor((100*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])))+0.5)/100;
		b[z].x=i;
		b[z].y=j;
		++z;
	}
	for(int i=0;i<n*(n-1)/2;++i)
		for(int j=0;i+j<n*(n-1)/2-1;++j)
		{
			if((b[c[j+1]].d - b[c[j]].d)>  EPS)
			{
				int temp=c[j];
				c[j]=c[j+1];
				c[j+1]=temp;
			}
			else if((fabs(b[c[j+1]].d - b[c[j]].d)<EPS))
			{
				if(b[c[j+1]].x<b[c[j]].x)
				{
				int temp=c[j];
				c[j]=c[j+1];
				c[j+1]=temp;
				}
			}
			
		}
for(int i=0;i<n*(n-1)/2;++i)
	{	
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",a[b[c[i]].x][0],a[b[c[i]].x][1],a[b[c[i]].x][2],a[b[c[i]].y][0],a[b[c[i]].y][1],a[b[c[i]].y][2],b[c[i]].d);
	}
return 0;

}
int main(){
	int a[10][3],n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<3;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
	struct{
	int x1,x2,y1,y2,z1,z2;
	double d;	
	}dis[45],mid;
	int m=0;
	for(int k=0;k<n-1;k++)
	{
		for(int l=k+1;l<n;l++)
		{
			dis[m].x1=a[k][0];
			dis[m].x2=a[l][0];
			dis[m].y1=a[k][1];
			dis[m].y2=a[l][1];
			dis[m].z1=a[k][2];
			dis[m].z2=a[l][2];
            dis[m].d=sqrt((dis[m].x1-dis[m].x2)*(dis[m].x1-dis[m].x2)+(dis[m].y1-dis[m].y2)*(dis[m].y1-dis[m].y2)+(dis[m].z1-dis[m].z2)*(dis[m].z1-dis[m].z2));
		    m++;		
		}
	}
    
    
    
for(int j = 1 ; j <= m ; j++){
    for(int p=0; p<m-j; p++){
			if(dis[p].d < dis[p+1].d){
					mid= dis[p+1];
					dis[p+1]=dis[p];
					dis[p]=mid;
			}
	}
}

    
    
    
    
  
for(int w=0;w<m;w++)
{
	printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",dis[w].x1,dis[w].y1,dis[w].z1,dis[w].x2,dis[w].y2,dis[w].z2,dis[w].d);
}
return 0;
}
int main() 
{ 
  int n,i,j,k,p,l; 
  double x[10],y[10],z[10],m; 
  double d[100],c[100]; 
  int a[100],b[100]; 
  scanf("%d",&n); 
  for(i=0;i<=n-1;++i) 
  { 
    scanf("%lf%lf%lf",&x[i],&y[i],&z[i]); 
  } 
  k=0; 
  for(i=0;i<=n-2;++i) 
  { 
    for(j=i+1;j<=n-1;++j) 
    { 
   
  d[k]=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[k]=i; 
      b[k]=j; 
      c[k]=d[k]; 
      k++; 
    } 
  } 
  for(i=0;i<=k-2;++i) 

  { 
    for(j=i+1;j<=k-1;++j) 
    { 
      if(c[i]<c[j]) 
      { 
        m=c[i]; 
        c[i]=c[j]; 
        c[j]=m; 
      } 
    } 
  } 
  for(i=0;i<=k-1;++i) 
  { 
    for(j=0;j<=k-1;++j) 
    { 
      if(c[i]==d[j]) 
      { 
     
  printf("(%.0lf,%.0lf,%.0lf)-(%.0lf,%.0lf,%.0lf)=%.2lf\n",x[a[j]],y[a[j
]],z[a[j]],x[b[j]],y[b[j]],z[b[j]],c[i]); 
        d[j]=-1; 
      } 
    } 
  } 
  return 0; 
}
int main()
{
	struct point
	{
		int x;
		int y;
		int z;
	}Point[10];
	int n,i,j,k=0,f[45],b[45],temp;
	double d[45],num;
	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;i++)
	{
		for(j=i+1;j<n;j++)
		{
			d[k]=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));
			f[k]=i;
			b[k]=j;
			k=k+1;
		}

	}
	for(i=0;i<k;i++)
	{
		for(j=0;j<k-i;j++)
		{
			if(d[j]<d[j+1])
			{
				temp=f[j];
				f[j]=f[j+1];
				f[j+1]=temp;
				temp=b[j];
				b[j]=b[j+1];
				b[j+1]=temp;
				num=d[j];
				d[j]=d[j+1];
				d[j+1]=num;
			}
		}
	}
	for(i=0;i<k;i++)
	{
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",Point[f[i]].x,Point[f[i]].y,Point[f[i]].z,Point[b[i]].x,Point[b[i]].y,Point[b[i]].z,d[i]);
	}
	return 0;
}
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;
            }
        }
    }
    s[k]=-1;
    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;
}
int main(){
	struct dian{
		int x,y,z;
	}dians[45];
	struct suoyou{
		struct dian qian;
		struct dian hou;
		double ji;
	}suoyous[45],e;
	int n;
	scanf("%d",&n);
	int i;
	for(i=0;i<n;i++){
		scanf("%d%d%d",&dians[i].x,&dians[i].y,&dians[i].z);
	}
	int k,l=0;
	for(i=0;i<n;i++){
		for(k=i+1;k<n;k++){
			suoyous[l].qian=dians[i];
			suoyous[l].hou=dians[k];
			suoyous[l].ji=sqrt((dians[i].x-dians[k].x)*(dians[i].x-dians[k].x)+(dians[i].y-dians[k].y)*(dians[i].y-dians[k].y)+(dians[i].z-dians[k].z)*(dians[i].z-dians[k].z));
			l++;
		}
	}
	for(i=1;i<=n*(n-1)/2;i++){
		for(k=0;k<n*(n-1)/2-i;k++){
			if(suoyous[k].ji<suoyous[k+1].ji){
				e=suoyous[k];
				suoyous[k]=suoyous[k+1];
				suoyous[k+1]=e;
			}
		}
	}
	for(i=0;i<n*(n-1)/2;i++){
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",suoyous[i].qian.x,suoyous[i].qian.y,suoyous[i].qian.z,suoyous[i].hou.x,suoyous[i].hou.y,suoyous[i].hou.z,suoyous[i].ji);
	}
	return 0;
}
float f(int a,int b,int c,int d,int e,int f);
int main()
{
    int x[11],y[11],z[11],i,j,n,num=0;
    scanf("%d",&n);
    //scanf("%d %d %d",&x[0],&y[0],&z[0]);
    for(i=0;i<n;i++)
    scanf("%d %d %d",&x[i],&y[i],&z[i]);
    struct POINT
    {
          int point1x;
          int point1y;
          int point1z;
          int point2x;
          int point2y;
          int point2z;
		  int mark;
          float l;
    };
    struct POINT temp;
    struct POINT d[55];
    for(i=0;i<n;i++)
    {
                    for(j=i+1;j<n;j++)
                    {
                                      d[num].mark=num;
                                      d[num].point1x=x[i];d[num].point1y=y[i];d[num].point1z=z[i];
                                      d[num].point2x=x[j];d[num].point2y=y[j];d[num].point2z=z[j];
                                      d[num].l=f(x[i],y[i],z[i],x[j],y[j],z[j]);
                                      num=num+1;            //printf("%.2f\n",d[num].l);printf("%d %d %d %d %d %d\n",x[i],y[i],z[i],x[j],y[j],z[j]);
                    }
    }                         //for(i=num-1;i>=0;i--)printf("%.2f\n",d[i].l);//printf("%d\n",num);
    for(i=1;i<num;i++)
    {
                      for(j=0;j<num-i;j++)
                      {
                                        if(d[j].l>d[j+1].l)
                                        {
                                                           temp=d[j];
                                                           d[j]=d[j+1];
                                                           d[j+1]=temp;
                                        }
                      }
    } 
	for(i=1;i<num;i++)
    {
                      for(j=0;j<num-i;j++)
                      {
                                        if(d[j].l==d[j+1].l&&d[j].mark<d[j+1].mark)
                                        {
                                                           temp=d[j];
                                                           d[j]=d[j+1];
                                                           d[j+1]=temp;
                                        }
                      }
    }                                                                                                                //printf("%.2f\n",d[3].l);
    for(i=num-1;i>=0;i--)
    printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",d[i].point1x,d[i].point1y,d[i].point1z,d[i].point2x,d[i].point2y,d[i].point2z,d[i].l);

    return 0;
}
float f(int a,int b,int c,int d,int e,int f)
{
      float length;
      length=sqrt((a-d)*(a-d)+(b-e)*(b-e)+(c-f)*(c-f));
      return(length);
}
//
//  main.cpp
//  ????
//
//  Created by ? ?? on 12-12-11.
//  Copyright (c) 2012? ? ??. All rights reserved.
//



int main()
{
    double b[99999][6];
    double c[99999];
    double a[1000][3];

    int n;
    cin >> n;
    int i, j, k = 0, m;
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < 3; j++)
        {
            cin >> a[i][j];
        }
    }
    for (i = 0; i < n - 1; i++)
    {
        for (j = i + 1; j < n; j++)
        {
            b[k][0] = a[i][0];b[k][1] = a[i][1];b[k][2] = a[i][2];b[k][3] = a[j][0];b[k][4] = a[j][1];b[k][5] = a[j][2];
            c[k] = sqrt(pow(a[j][0] - a[i][0], 2) + pow(a[j][1] - a[i][1], 2) + pow(a[j][2] - a[i][2], 2));
            k++;
        }
    }
    for (i = 0; i < k - 1; i++)
    {
        for (j = 0; j < k - 1 - i; j++)
        {
            if (c[j] < c[j + 1])
            {
                double p = c[j];
                c[j] = c[j + 1];
                c[j + 1] = p;
                for (m = 0; m < 6; m++)
                {
                    p = b[j][m];
                    b[j][m] = b[j+1][m];
                    b[j+1][m] = p;
                }
            }
        }
    }
    for (i = 0; i < k; i++)
    {
        cout << fixed << setprecision(0) << "(" << b[i][0] << "," << b[i][1] << "," << b[i][2] << ")" << "-" << "(" << b[i][3] << "," << b[i][4] << "," << b[i][5] << ")" << "=" << fixed << setprecision(2) << c[i] << endl;
    }
    return 0;
}
struct point1
{
  int x;
  int y;
  int z;
} point[10];

struct comb1
{
  struct point1 po1;
  struct point1 po2;
  double distant;
} comb[50],t;
int abs(int a)
{
  if(a>=0) return a;
  else return(-a);
}
double dis(struct point1 a,struct point1 b)
{
   int p,q,r;
   double ans;
   p=(a.x-b.x)*(a.x-b.x);
   q=(a.y-b.y)*(a.y-b.y);
   r=(a.z-b.z)*(a.z-b.z);
   ans=sqrt(p+q+r);
   return ans;
}

int main()
{
  int n,i,j,k;
  scanf("%d",&n);
  for(i=0;i<n;i++)
   scanf("%d%d%d",&point[i].x,&point[i].y,&point[i].z);
  k=0;
  for(i=0;i<n;i++)
   for(j=i+1;j<n;j++)
    {
	  comb[k].po1=point[i];
	  comb[k].po2=point[j];
	  comb[k].distant=dis(comb[k].po1,comb[k].po2);
	  k++;
	}
  for(i=1;i<k;i++)
   for(j=0;j<k-i;j++)
    if(comb[j].distant<comb[j+1].distant)
	{
	  t=comb[j];
	  comb[j]=comb[j+1];
	  comb[j+1]=t;
	}
  for(i=0;i<k;i++)
   printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",comb[i].po1.x,comb[i].po1.y,comb[i].po1.z,comb[i].po2.x,comb[i].po2.y,comb[i].po2.z,comb[i].distant);
  //scanf("%d",&i);
  return 0;
}
int main (){
int n,i,j,k,h,l;
scanf("%d",&n);
k=0;
int a[11];
int b[11];
int c[11];
int f[100];
int e[100];
double d[10000];
for(i=0;i<n;i++){
	scanf("%d%d%d",&(a[i]),&(b[i]),&(c[i]));
}
k=1;
d[0]=0;
for(j=0;j<n;j++){
   for(i=j+1;i<n;i++){
	d[k]=sqrt((a[j]-a[i])*(a[j]-a[i])+(b[j]-b[i])*(b[j]-b[i])+(c[j]-c[i])*(c[j]-c[i]));
	e[k]=i;   
	f[k]=j;   //??d[k]???j,i
	k++;

   }l=k;

}for(h=0;h<n*n;h++){
	for(k=0;k<=l;k++){
		if(d[k]!=0){
	   for(i=0;i<=l;i++){
		   if(d[k]<d[i]){
			   break;
		   }if(i==(l-1)){
			   printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",a[f[k]],b[f[k]],c[f[k]],a[e[k]],b[e[k]],c[e[k]],d[k]);
			   d[k]=0;
			     k=0;
			     i=0;
			   break;

		   }
		}
		}
	   }
    }
    return 0;
}
//************************
//???????
//?????
//???2011-12-14
//************************
int main()
{
	int x[10], y[10], z[10], n, i, j;
	struct distance
	{
		int x1;             //??
		int y1;
		int z1;
		int x2;
		int y2;
		int z2;
		double c;           //??
	}dis[46];
	cin >> n;
	cout << fixed;
	for(i = 0;i < n;i++)
	{
		cin >> x[i] >> y[i] >> z[i];           //????
	}
	int k = 0;
	for(i = 0;i < n;i++)             //??????????????
		for(j = i + 1;j < n;j++)
		{
			dis[k].x1 = x[i];
			dis[k].y1 = y[i];
			dis[k].z1 = z[i];
			dis[k].x2 = x[j];
			dis[k].y2 = y[j];
			dis[k].z2 = z[j];
			dis[k++].c = sqrt((dis[k].x1 - dis[k].x2) * (dis[k].x1 - dis[k].x2) + (dis[k].y1 - dis[k].y2) * (dis[k].y1 - dis[k].y2) + (dis[k].z1 - dis[k].z2) * (dis[k].z1 - dis[k].z2));
		}
	int t, t1;
	for(i = 0;i < n * (n - 1) / 2 - 1;i++)
		for(j = i + 1;j < n * (n - 1) / 2;j++)
		{
			if(dis[j].c - dis[i].c > 1e-6)     //??????????????????     
			{
				dis[45] = dis[j];
				for(t = j, t1 = j;t > i;t--)
				{
					dis[t] = dis[--t1];
				}
				dis[i] = dis[45];
			}
		}
	for(i = 0;i < n * (n - 1) / 2;i++)         //??
	{
		cout << "(" << dis[i].x1 << "," << dis[i].y1 << "," << dis[i].z1 << ")" << "-" << "(" << dis[i].x2 << "," << dis[i].y2 << "," << dis[i].z2 << ")" << "=" << setprecision(2) << dis[i].c << endl;
	}
	return 0;
}