semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
struct coordinate
{
    int x;
    int y;
    int z;   
       
} point[10];

int main() 
{
    double dis[10][10]={0}, d[100]={0}, temp=0;
    int i, j, n, k1=0, k2=0, k;
    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++)
        {
            dis[i][j]=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)) ; 
			d[10*i+j]=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<99; i++)
    {
        for(j=99; j>i; j--)
        {
            if(d[j]>d[j-1])
            {
                temp=d[j];
                d[j]=d[j-1];
                d[j-1]=temp;           
            }      
        }      
    }
    for(i=99; i>=1; i--)
    {
		if(d[i]==d[i-1])
		{
			d[i]=0;
		}
		
	}
    for(k=0; k<99; k++)
    {
        if(d[k]!=0)
        {
			for(i=0; i<n-1; i++)
			{
				for(j=i+1; j<n; j++)
				{
					if(dis[i][j]==d[k])
					{
						
                       cout<<"("<<point[i].x<<","<<point[i].y<<","<<point[i].z<<")-("<<
                                  point[j].x<<","<<point[j].y<<","<<point[j].z<<")="<<fixed<<setprecision(2)<<dis[i][j]<<endl;
					}
					
				}
			}  
        }      
    }
    
    return 0;
}
int main()
{
    int i,k,m,n,h,d,g;
    int a[10],b[10],c[10],p[50],q[50];
    double s[50],max;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        scanf("%d%d%d",&a[i],&b[i],&c[i]);
    }
    for(i=1,m=0;i<n;i++)
    {
        for(k=i+1;k<=n;k++)
        {
            m++;
            s[m]=sqrt((a[i]-a[k])*(a[i]-a[k])+(b[i]-b[k])*(b[i]-b[k])+(c[i]-c[k])*(c[i]-c[k]));
            p[m]=i;
            q[m]=k;
        }
    }
    for(i=1;i<=m;i++)
    {
        for(k=1;k<=m-i;k++)
        {
            if(s[k]<s[k+1])
            {
                max=s[k];
                s[k]=s[k+1];
                s[k+1]=max;
                h=p[k];
                p[k]=p[k+1];
                p[k+1]=h;
                d=q[k];
                q[k]=q[k+1];
                q[k+1]=d;
            }
        }
    }
    for(i=1;i<=m;i++)
    {
        h=p[i];
        d=q[i];
    	
   printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",a[h],b[h],c[h],a[d],b[d],c[d],s[i]); 
    }
    return 0;

}
float juli(float x1,float y1,float z1,float x2,float y2,float z2)
{
	return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2));
}
int main()
{
	int n,u=0;
	int i,j,t;
	float x[10],y[10],z[10],d[50],m;
	int a[50],b[50];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%f %f %f",&x[i],&y[i],&z[i]);
	}
	for(i=0;i<n-1;i++)
	{
		for(j=i+1;j<n;j++)
		{ 
			d[u]=juli(x[i],y[i],z[i],x[j],y[j],z[j]);
			a[u]=i;
			b[u]=j;
			u++;
		}
	}
	for(i=0;i<u;i++)
	{
		for(j=u-1;j>i;j--)
		{
			if(d[j]>d[j-1])
			{
				m=d[j];
				d[j]=d[j-1];
				d[j-1]=m;
				t=a[j];
				a[j]=a[j-1];
				a[j-1]=t;
				t=b[j];
				b[j]=b[j-1];
				b[j-1]=t;
			}
		}
	}
	for(i=0;i<u;i++)
	{
		printf("(%.0f,%.0f,%.0f)-(%.0f,%.0f,%.0f)=%.2f\n",x[a[i]],y[a[i]],z[a[i]],x[b[i]],y[b[i]],z[b[i]],d[i]);
	}
	return 0;
}
int main()
{
   int n,i,j,k=0,l;
   double B[10][10],a,C[91]={0},A[10][3];
   cin>>n;
   for (i=0;i<n;i++)
      cin>>A[i][0]>>A[i][1]>>A[i][2];    
   for (i=0;i<n-1;i++)
   {
      for (j=i+1;j<n;j++)
      {
         B[i][j]=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]=B[i][j];
		 k=k+1;
      }
   }
   for (i=0;i<n*(n-1)/2;i++)
   {
      for (j=0;j<n*(n-1)/2-1;j++)
	  {
	    if (C[j]<C[j+1])
		{
		  a=C[j];
		  C[j]=C[j+1];
		  C[j+1]=a;
		}
	  }
   }
   for (i=0;i<n*(n-1)/2;i++)
   {
      for (k=0;k<n-1;k++)
	  {
		  for (l=k+1;l<n;l++)
		  {
	         if (B[k][l]==C[i])
			 {
				   cout<<fixed<<setprecision(0)<<"("<<A[k][0]<<","<<A[k][1]<<","<<A[k][2]<<")"<<"-"<<"("<<A[l][0]<<","<<A[l][1]<<","<<A[l][2]<<")"<<"=";
			   	   cout<<fixed<<setprecision(2)<<B[k][l]<<endl;
				   B[k][l]=0;
			 }
		  }
	  }
   }
   return 0;
}
int main()
{
    int i,n,k,p=0,f;
    int c[100],d[100];
    int a[100][50];
    double b[200],q,e;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
                    scanf("%d",&a[i][0]);
                    scanf("%d",&a[i][1]);
                    scanf("%d",&a[i][2]);
    }
    for(i=0;i<n;i++)
    {
                    for(k=i+1;k<n;k++)
                    {
                                      q=(a[i][0]-a[k][0])*(a[i][0]-a[k][0])+(a[i][1]-a[k][1])*(a[i][1]-a[k][1])+(a[i][2]-a[k][2])*(a[i][2]-a[k][2]);
                                      b[p]=sqrt(q);
                                      c[p]=i;
                                      d[p]=k;
                                      p++;
                    }
    }
    for(i=1;i<=p;i++)
    {
                    for(k=0;k<p-i;k++)
                    {
                                      if(b[k+1]>b[k])
                                      {
                                                     e=b[k+1];
                                                     b[k+1]=b[k];
                                                     b[k]=e;
                                                     f=c[k+1];
                                                     c[k+1]=c[k];
                                                     c[k]=f;
                                                     f=d[k+1];
                                                     d[k+1]=d[k];
                                                     d[k]=f;
                                      }
                    }
    }
    for(i=0;i<p;i++)
    {
                    printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",a[c[i]][0],a[c[i]][1],a[c[i]][2],a[d[i]][0],a[d[i]][1],a[d[i]][2],b[i]);
    }
    return 0;
}
struct point
{
	int x;
	int y;
	int z;
}po[10];
struct distance
{
	double dist;
	int x1;
	int y1;
	int z1;
	int x2;
	int y2;
	int z2;
};
int main()
{
	int n,i,j,k=0;
	struct distance dis[50],temp;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>po[i].x>>po[i].y>>po[i].z;
	}
	for(i=0;i<n-1;i++)
		for(j=i+1;j<n;j++)
		{
			dis[k].dist=sqrt((po[i].x-po[j].x)*(po[i].x-po[j].x)+(po[i].y-po[j].y)*(po[i].y-po[j].y)+(po[i].z-po[j].z)*(po[i].z-po[j].z));
			dis[k].x1=po[i].x;
			dis[k].y1=po[i].y;
			dis[k].z1=po[i].z;
			dis[k].x2=po[j].x;
			dis[k].y2=po[j].y;
			dis[k].z2=po[j].z;
			k++;
		}
	for(i=0;i<n*(n-1)/2-1;i++)
	{
	    for(j=0;j<n*(n-1)/2-i-1;j++)
	    {
	        if(dis[j].dist<dis[j+1].dist)
	        {
	            temp=dis[j+1];
	            dis[j+1]=dis[j];
	            dis[j]=temp;
	        }
	    }
    }
	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<<")"<<"="<<fixed<<setprecision(2)<<dis[i].dist<<endl;
	}
	return 0;
}
int main(){
	int a[10][3];
	int n;
	int i,j,k;
	//double ans[100];
	double ans[10][10];
	cin>>n;
	for(i = 0;i<n;++i){
		for(j = 0;j<3;++j){
			cin>>a[i][j];
		}	
	}
	
	for(i = 0;i<n;++i){
		for(j = i+1;j<n;++j){
			ans[i][j] = sqrt(pow((double)a[i][0]-a[j][0],2)+pow((double)a[i][1]-a[j][1],2)+pow((double)a[i][2]-a[j][2],2));
			//cout<<ans[i *n + j]<<" ";	
		}	
		//cout<<endl;
	}
	int sum = n*(n-1)/2;
	while(sum >0){
		sum--;
		int maxI = 0;
		int maxJ = 1;
		for(i = 0;i<n;++i){
			for(j = i+1;j<n;++j){
				if(ans[i][j] > ans[maxI][maxJ]){
					maxI = i;
					maxJ = j;
				}
			}	
		}
		//(1,1,0)-(1,1,1)=1.00
		cout<<"("<<a[maxI][0]<<","<<a[maxI][1]<<","<<a[maxI][2]<<")-("
		<<a[maxJ][0]<<","<<a[maxJ][1]<<","<<a[maxJ][2]<<")="
		<<fixed<<setprecision(2)<<ans[maxI][maxJ]<<endl;	
		ans[maxI][maxJ] = -9999999;
	}

	cin>>i;
	return 0;
}
double juli(int a,int b,int c,int d,int e,int f)
{
	double t;
	t=sqrt((a-d)*(a-d)+(b-e)*(b-e)+(c-f)*(c-f));
	return t;
}
int main()
{
	int a[11],b[11],c[11],e[50],f[50],temp1;
	double d[50],temp;
	int n,i,j,t=0;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	{
		scanf("%d%d%d",&a[i],&b[i],&c[i]);
	}
	for(j=0;j<=n-2;j++)
	{
		for(i=j;i<=n-2;i++)
		{
			d[t]=juli(a[j],b[j],c[j],a[i+1],b[i+1],c[i+1]);
			e[t]=j;
			f[t]=i+1;
			t++;
		}
	}
	for(i=0;i<=n*(n-1)/2-2;i++)
	{
		for(j=0;j<=n*(n-1)/2-2-i;j++)
		{
			if(d[j]<d[j+1])
			{
				temp=d[j];
				d[j]=d[j+1];
				d[j+1]=temp;
				temp1=e[j];
				e[j]=e[j+1];
				e[j+1]=temp1;
				temp1=f[j];
				f[j]=f[j+1];
				f[j+1]=temp1;
			}
		}
	}
	for(i=0;i<=n*(n-1)/2-1;i++)
	{
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",a[e[i]],b[e[i]],c[e[i]],a[f[i]],b[f[i]],c[f[i]],d[i]);
	}
	return 0;
}
int main (){
	int n;
	cin>>n;
	int x[10],y[10],z[10];
	int i,j;
	for(i=0;i<=n-1;i++)
		cin>>x[i]>>y[i]>>z[i];
	float d[45];
	int s[45],e[45];
	int t=0;
	for(i=0;i<=n-2;i++)
		for(j=i+1;j<=n-1;j++)
		{
			d[t]=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]));
			s[t]=i,e[t]=j;
			t++;
		}
	float tempd;
	int temp;
	for(i=0;i<=t-2;i++)
		for(j=t-1;j>=i+1;j--)
			if(d[j]>d[j-1])
			{
				tempd=d[j];d[j]=d[j-1];d[j-1]=tempd;
				temp=s[j];s[j]=s[j-1];s[j-1]=temp;
				temp=e[j];e[j]=e[j-1];e[j-1]=temp;
			}
	cout<<fixed<<setprecision(2);
	for(i=0;i<=t-1;i++)
		cout<<"("<<x[s[i]]<<","<<y[s[i]]<<","<<z[s[i]]<<")-("<<x[e[i]]<<","<<y[e[i]]<<","<<z[e[i]]<<")="<<d[i]<<endl;
}
int main(){
	int i,x,n,g,l,p,a,b,c;
	double e;
	double dst[45];
	int xz[10];int yz[10];int zz[10];
	int dx[45];int dy[45];int dz[45];
	int sx[45];int sy[45];int sz[45];

	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d %d ",&(xz[i]),&(yz[i]),&(zz[i]));
	}
	g=0;

	for(i=0;i<n-1;i++){
		for(x=i+1;x<n;x++){
				a=((xz[i])-(xz[x]))*((xz[i])-(xz[x]));
				b=((yz[i])-(yz[x]))*((yz[i])-(yz[x]));
				c=((zz[i])-(zz[x]))*((zz[i])-(zz[x]));
				dst[g]=pow((double)(a+b+c),0.5);
			dx[g]=xz[i];dy[g]=yz[i];dz[g]=zz[i];
			sx[g]=xz[x];sy[g]=yz[x];sz[g]=zz[x];
			g=g+1;
		}
	}
	for(i=0;i<g;i++){
		for(x=0;x<g-i-1;x++){
			if(dst[x]<dst[x+1]){
				e=dst[x+1];
				dst[x+1]=dst[x];
				dst[x]=e;
				
				l=dx[x+1];
				dx[x+1]=dx[x];
				dx[x]=l;				
				
			    l=dy[x+1];
				dy[x+1]=dy[x];
				dy[x]=l;				
				
				l=dz[x+1];
				dz[x+1]=dz[x];
				dz[x]=l;				
				
				l=sx[x+1];
				sx[x+1]=sx[x];
				sx[x]=l;				
				
				l=sy[x+1];
				sy[x+1]=sy[x];
				sy[x]=l;				
				
				l=sz[x+1];
				sz[x+1]=sz[x];
				sz[x]=l;
			}
		}
	}
	for(i=0;i<g;i++){
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n\n",dx[i],dy[i],dz[i],sx[i],sy[i],sz[i],dst[i]);
	}
return 0;
}
int main(){
    int x[10],y[10],z[10];
    double l[10][10];
    double d[100];
    double m;
    int i,j,k,n;
	int s=0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d %d %d",&x[i],&y[i],&z[i]);
    }
    for(i=0;i<n-1;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]));
            d[s]=l[i][j];
            s+=1;
        }
    }
    for(i=0;i<n*n;i++){
        for(j=0;j<n*(n-1)/2-1;j++){
            if(d[j]<d[j+1]){
                m=d[j];
                d[j]=d[j+1];
                d[j+1]=m;
            }
        }
    }
    for(k=0;k<n*(n-1)/2;k++){
        while(d[k]==d[k-1]){
            k+=1;
        }
        for(i=0;i<n-1;i++){
            for(j=i+1;j<n;j++){
                if(l[i][j]==d[k]){
                    printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[i],y[i],z[i],x[j],y[j],z[j],d[k]);
                }
            }
        }
    }
    return 0;
}
/**
* @file homework.cpp
* @author ???
* @date 2011-12-06
* @description
* ??????: ??????
*/

struct juli
{
	int a;
	int b;
	double dis;
}x[45],t;

int main()
{
	int n,m=0;
	int i,j,k,p=0,l,s,r;
	int a[10][3]={0};
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[i][0]>>a[i][1]>>a[i][2];
	}
	m=n*n/2-n/2;
	for(j=0;j<n-1;j++)
	{
		for(k=j+1;k<n;k++)
		{
			if(k>j)
			{
				x[p].a=j;
				x[p].b=k;
				x[p].dis=sqrt((a[j][0]-a[k][0])*(a[j][0]-a[k][0])
					+(a[j][1]-a[k][1])*(a[j][1]-a[k][1])
					+(a[j][2]-a[k][2])*(a[j][2]-a[k][2]));
				p++;
			}
		}
	}
	for(l=0;l<m-1;l++)
	{
		for(s=0;s<m-l-1;s++)
		{
			if(x[s].dis<x[s+1].dis)
			{
				t=x[s];
				x[s]=x[s+1];
				x[s+1]=t;
			}
		}
	}
	for(r=0;r<m;r++)
	{
		cout<<"("<<a[x[r].a][0]<<","<<a[x[r].a][1]<<","<<a[x[r].a][2]<<")-("
			     <<a[x[r].b][0]<<","<<a[x[r].b][1]<<","<<a[x[r].b][2]<<")="
				 <<fixed<<setprecision(2)<<x[r].dis<<endl;
	}
	return 0;
}
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;
}
struct twopoint{
    float a1[3],a2[3],c;
}b[45];
float a[10][3];
int select(float b[],int n){
	int i,j,c;
	for(i=0;i<n;i++){ c=0;
	for(j=0;j<3;j++)
		if(b[j]==a[i][j]) c++;
		if(c==3) return(i);
	}
}
void selectsort(struct twopoint b[],int n,int m){
	int i,j,k,i1,j1; 
	float d[4];
	struct twopoint temp;
	for(i=0;i<n;i++){   d[3]=0;
	for(j=0;j<3;j++){
		d[j]=b[i].a1[j]-b[i].a2[j];
		d[j]=d[j]*d[j];
		d[3]+=d[j];
	}
	b[i].c=sqrt(d[3]);
	}
	for(i=0;i<n-1;i++){
k=i;
for(j=i+1;j<n;j++)
if(b[j].c>b[k].c) k=j;
else if(b[j].c==b[k].c){
	i1=select(b[j].a1,m);
	j1=select(b[k].a1,m);
	if(i1<j1) k=j;
	if(i1==j1){
	i1=select(b[j].a2,m);
	j1=select(b[k].a2,m);
	if(i1<j1)   k=j;
	}
}

if(k!=i){
	temp=b[k];
	b[k]=b[i];
	b[i]=temp;
}
	}
}
main(){
int n1,n2,i,j,k,l=0,l1;
scanf("%d",&n1);
k=(n1-1)*n1/2;    n2=n1;
for(i=0;i<n1;i++)
	for(j=0;j<3;j++)
		scanf("%f",&a[i][j]);
	i=0;
	while(--n2>0){    l1=l;
	for(;l<l1+n2;l++)
		for(j=0;j<3;j++)
			b[l].a1[j]=a[i][j];
		i++;
	}
	n2=n1;l=0;i=0;
	while(--n2>0){   l1=l;i++;
	for(;l<l1+n2;l++)
	for(j=0;j<3;j++)
			b[l].a2[j]=a[l-l1+i][j];
	}
	selectsort(b,k,n1);
	for(i=0;i<k;i++)
		printf("(%g,%g,%g)-(%g,%g,%g)=%0.2f\n",b[i].a1[0],b[i].a1[1],b[i].a1[2],b[i].a2[0],b[i].a2[1],b[i].a2[2],b[i].c);
}
int main(){
	 int n,x[20],y[20],z[20];
	 float dis[20][20],a[400];
	 int k=0;
	 cin>>n;
	 for(int i=0;i<n;i++)
		 cin>>x[i]>>y[i]>>z[i];
	 for(int i=0;i<n;i++)
		 for(int j=i+1;j<n;j++)
			 {
	 			a[k]=dis[i][j]=sqrt((float)((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])+(z[i]-z[j])*(z[i]-z[j])));
				k++;
		     }
	 for(int i=0;i<k-1;i++)
		 for(int j=0;j<k-i;j++)
			if(a[j]<a[j+1])
				 swap(a[j],a[j+1]);

	 for(int g=0;g<k;g++)
		 {
			 for(int i=0;i<n;i++)
			 {
				for(int j=i+1;j<n;j++)
				{
					if (a[g]!=a[g+1]&&a[g]==dis[i][j])
					{
						printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",x[i],y[i],z[i],x[j],y[j],z[j],a[g]);
					}
				}
			 }
		}
 return 0;
 }
struct point
{
    int x;
    int y;
    int z;
} p[100];

struct line
{
    int p1;
    int p2;
    double len;
} l[1000];

int main()
{
    int n, i, j, d[1000], c = 0;
    double temp;
    cin >> n;
    for (i = 0; i < n; i++)
    {
        cin >> p[i].x >> p[i].y >> p[i].z;
    }
    for (i = 0; i < n; i++)
    {
        for (j = i + 1; j < n; j++)
        {
            l[c].len = 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));
            l[c].p1 = i;
            l[c].p2 = j;
            c++;
        }
    }
    for (i = 0; i < n * (n - 1) / 2; i++)
    {
        for (j = 0; j < n * (n - 1) / 2 - i; j++)
        {
            if (l[j].len < l[j + 1].len )
            {
                temp = l[j].len;
                l[j].len = l[j + 1].len;
                l[j + 1].len = temp;
                temp = l[j].p1;
                l[j].p1 = (int) l[j + 1].p1;
                l[j + 1].p1 =(int) temp;
                temp = l[j].p2;
                l[j].p2 = (int) l[j + 1].p2;
                l[j + 1].p2 =(int) temp;
            }
        }
    }
    for (i = 0; i < n * (n - 1) / 2; i++)
    {
        cout << "(" << p[l[i].p1].x << "," << p[l[i].p1].y << "," << p[l[i].p1].z << ")-(" << p[l[i].p2].x << "," << p[l[i].p2].y << "," << p[l[i].p2].z << ")=" << fixed << setprecision(2) << l[i].len << setprecision(0) << 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[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++;
}
}
int main()
{
	int n,i,s,j;
	struct point
	{
		int a,b,c;
	}p[10];
	struct distance
	{
		double d;
		int x1,x2,y1,y2,z1,z2;
	}dis[45],temp;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d%d%d",&p[i].a,&p[i].b,&p[i].c);
	i=0;
	j=1;
	for(s=0;s<n*(n-1)/2;s++)
	{
		dis[s].x1=p[i].a;
		dis[s].x2=p[j].a;
		dis[s].y1=p[i].b;
		dis[s].y2=p[j].b;
		dis[s].z1=p[i].c;
		dis[s].z2=p[j].c;
		j++;
		if(j==n)
		{
			i++;
			j=i+1;
		}
	}
	for(s=0;s<n*(n-1)/2;s++)
		dis[s].d=sqrt((dis[s].x1-dis[s].x2)*(dis[s].x1-dis[s].x2)+(dis[s].y1-dis[s].y2)*(dis[s].y1-dis[s].y2)+(dis[s].z1-dis[s].z2)*(dis[s].z1-dis[s].z2));
	for(j=1;j<n*(n-1)/2;j++)
	{
		for(i=0;i<n*(n-1)/2-j;i++)
		{
			if(dis[i].d<dis[i+1].d)
			{
				temp=dis[i];
				dis[i]=dis[i+1];
				dis[i+1]=temp;
			}
		}
	}
	for(s=0;s<n*(n-1)/2;s++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",dis[s].x1,dis[s].y1,dis[s].z1,dis[s].x2,dis[s].y2,dis[s].z2,dis[s].d);
	return 0;
}
int main(){
    int n, xz[100], yz[100], zz[100], xx[100], yy[100];
    double jl[100];
    double j[100];
    int c=0;
    int t, m, l;
    scanf("%d\n",&n);
    for(int i=0;i<n;i++){
            scanf("%d %d %d",&xz[i], &yz[i], &zz[i]);
    }
    for(int a=0;a<n;a++){
        for(int b=a+1;b<n;b++){
        jl[c]=(zz[b]-zz[a])*(zz[b]-zz[a])+(xz[b]-xz[a])*(xz[b]-xz[a])+(yz[b]-yz[a])*(yz[b]-yz[a]);
        xx[c]=a;
        yy[c]=b;
        c=c+1;
    }
    }
    for(int k=1;k<=c;k++){
    for(int i=0;i<c-k;i++){
        if(jl[i]<jl[i+1]){
            t=jl[i];
            jl[i]=jl[i+1];
            jl[i+1]=t;
            m=xx[i];
            xx[i]=xx[i+1];
            xx[i+1]=m;
            l=yy[i];
            yy[i]=yy[i+1];
            yy[i+1]=l;
        }
    }
    }
    for(int w=0;w<c;w++){
        j[w]=sqrt(jl[w]);
    }
    for(int s=0;s<c;s++){
       printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n", xz[xx[s]], yz[xx[s]], zz[xx[s]], xz[yy[s]], yz[yy[s]], zz[yy[s]], j[s]);
    }
    return 0;}
int point[MAX][3];
double d;
struct {
    int x1,x2,y1,y2,z1,z2;
    double d;
}dis[DIS],mid;
int n,m=0,i,j;
int main()
{
    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++)
        {
            dis[m].x1=point[i][0];
            dis[m].y1=point[i][1];
            dis[m].z1=point[i][2];
            dis[m].x2=point[j][0];
            dis[m].y2=point[j][1];
            dis[m].z2=point[j][2];
            dis[m].d=sqrt(pow((dis[m].x1-dis[m].x2),2)+pow((dis[m].y1-dis[m].y2),2)+pow((dis[m].z1-dis[m].z2),2));
            m++;
        }
    }
    for(i=0;i<m;i++)
    {
        for(j=0;j<m-1;j++)
        {
            if(dis[j].d<dis[j+1].d)
            {
                mid=dis[j];
                dis[j]=dis[j+1];
                dis[j+1]=mid;
            }
        }
    }
    for(i=0;i<m;i++)
    {
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",dis[i].x1,dis[i].y1,dis[i].z1,dis[i].x2,dis[i].y2,dis[i].z2,dis[i].d);
    }
    return 0;
}
void main()
{
	int i,j,k,n;
	int point[10][3];
	double dis[10][10];
	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++)
//		printf("%d %d %d\n",point[i][0],point[i][1],point[i][2]);

	for(i=0;i<n-1;i++)
		for(j=i+1;j<n;j++)
			dis[i][j]=(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]);
	for(k=n*(n-1)/2;k>0;k--)
	{
		double max=0;
		int s,t;
		for (i=0;i<n-1;i++)
			for(j=i+1;j<n;j++)
				if(dis[i][j]>max)
				{
					max=dis[i][j];
					s=i;
					t=j;
				}
		max=sqrt(max);
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",point[s][0],point[s][1],point[s][2],point[t][0],point[t][1],point[t][2],max);
		dis[s][t]=0;
	}
}
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;
}
int main()
{
	int n,i,k,j,sum=0,l=0;
	double di[100],e;
	struct i{
		int x,y,z;
	}a[100],b[100],g,c[100];
   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[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));
                b[l]=a[i];
			    c[l]=a[j];
				l++;
		  }
	  }
for(k=1;k<=l;k++)
{
	for(i=0;i<l-k;i++)
	{
		if(di[i]<di[i+1])
		{
			e=di[i];
			di[i]=di[i+1];
			di[i+1]=e;
			g=b[i];
			b[i]=b[i+1];
			b[i+1]=g;
			g=c[i];
			c[i]=c[i+1];
			c[i+1]=g;
		}
	}
}
for(i=0;i<l;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;
}