semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
    int n;
    scanf("%d",&n);
    int d[n][3];
    for(int i=0;i<n;i++){
        for(int j=0;j<3;j++){
            scanf("%d",&d[i][j]);
        }
    }
    int c=n*(n-1)/2;
    double len[c];
    for(int i=0;i<c;i++){
        len[i]=0;
    }
    int b=0;
    int o[c], p[c], q[c], r[c], s[c], t[c];
    for(int i=0;i<(n-1);i++){
        for(int j=i+1;j<n;j++){
            double tmp=0;
            tmp=1.0*sqrt((d[i][0]-d[j][0])*(d[i][0]-d[j][0])+(d[i][1]-d[j][1])*(d[i][1]-d[j][1])+(d[i][2]-d[j][2])*(d[i][2]-d[j][2]));
            len[b]=tmp;
            o[b]=d[i][0];
            p[b]=d[i][1];
            q[b]=d[i][2];
            r[b]=d[j][0];
            s[b]=d[j][1];
            t[b]=d[j][2];
            b=b+1;
        }
    }
    for(int i=0;i<c;i++){
        for(int j=c-1;j>i;j--){
            if (len[j]>len[j-1]){
                double tmp=0;
                tmp=len[j-1];
                len[j-1]=len[j];
                len[j]=tmp;
                int y=0;
                y=o[j-1];
                o[j-1]=o[j];
                o[j]=y;
                y=0;
                y=p[j-1];
                p[j-1]=p[j];
                p[j]=y;
                y=0;
                y=q[j-1];
                q[j-1]=q[j];
                q[j]=y;
                y=0;
                y=r[j-1];
                r[j-1]=r[j];
                r[j]=y;
                y=0;
                y=s[j-1];
                s[j-1]=s[j];
                s[j]=y;
                y=0;
                y=t[j-1];
                t[j-1]=t[j];
                t[j]=y;
            }
        }
    }
    for(int i=0;i<c;i++){
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",o[i], p[i], q[i], r[i], s[i], t[i], len[i]);
    }
    return 0;
}
struct dir{
	int dot1[3];
	int dot2[3];
	float dis;
	
} dir[50];
struct dir temp;
int num[30];
int dot[50][3];
int n,i,j,p=0,a,b;
int main()
{
	
	scanf("%d",&n);
	
	for(i=1;i<=3*n;i++)
	{
		scanf("%d",&num[i]);
		if(i%3!=0)
		{
			a=i/3;
		    b=i%3-1;
			dot[a][b]=num[i];
		}
		else dot[i/3-1][2]=num[i];
	} 

	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			dir[p].dot1[0]=dot[i][0];dir[p].dot1[1]=dot[i][1];dir[p].dot1[2]=dot[i][2];
			dir[p].dot2[0]=dot[j][0];dir[p].dot2[1]=dot[j][1];dir[p].dot2[2]=dot[j][2];
			dir[p].dis=sqrt((dot[i][0]-dot[j][0])*(dot[i][0]-dot[j][0])+(dot[i][1]-dot[j][1])*(dot[i][1]-dot[j][1])+(dot[i][2]-dot[j][2])*(dot[i][2]-dot[j][2]));
			p++;
		}
	}
	
	for(i=1;i<p;i++)
	{
		for(j=0;j<p-i;j++)
			
		{
			if(dir[j].dis<dir[j+1].dis)
			{
				temp=dir[j];
				dir[j]=dir[j+1];
				dir[j+1]=temp;
			}
		}
	}
	for(i=0;i<p;i++)
	{
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",dir[i].dot1[0],dir[i].dot1[1],dir[i].dot1[2],dir[i].dot2[0],dir[i].dot2[1],dir[i].dot2[2],dir[i].dis);
	}
	return 0;
}
struct dot
{
	int x;
	int y;
	int z;
}point[10];
int main()
{
	int n,i,j,k,l,t=0,s=0;
	float a[10][10]={0},tem,b[50]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d%d%d",&point[i].x,&point[i].y,&point[i].z);
		s=s+i;
	}
	for(i=0;i<n-1;i++)
		for(j=i+1;j<n;j++)
		{
		a[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));
		b[t]=a[i][j];
		t++;
		}
	for(i=0;i<s-1;i++)
		for(j=0;j<s-i-1;j++)
		{
			if(b[j]<b[j+1])
			{
				tem=b[j];
				b[j]=b[j+1];
				b[j+1]=tem;
			}
		}
	for(k=0;k<s;k++)
	{
		if(b[k]==b[k-1])
			continue;
		else
		{
		for(i=0;i<n-1;i++)
	    	for(j=i+1;j<n;j++)
			{
				if(a[i][j]==b[k])
					printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",point[i].x,point[i].y,point[i].z,point[j].x,point[j].y,point[j].z,b[k]);
			}
		}
	}
	return 0;
}
int main(){
	int k[10][3],t;
	int n,i,j,a,b,g[100];
	double h[100],e;
	scanf("%d",&n);
	for(i=0;i<100;i++){
		g[i]=i;
	}
	for(i=0;i<100;i++){
		h[i]=-1;
	}
	for(i=0;i<n;i++){
		for(j=0;j<3;j++){
			scanf("%d",&k[i][j]);
		}
	}
	for(i=0;i<n-1;i++){
		for(j=i+1;j<n;j++){
			h[i*n+j]=1.0*sqrt((k[i][0]-k[j][0])*(k[i][0]-k[j][0])+(k[i][1]-k[j][1])*(k[i][1]-k[j][1])+(k[i][2]-k[j][2])*(k[i][2]-k[j][2]));
		}
	}

	for(i=0;i<100;i++){
		for(j=99;j>i;j--){
			if(h[j-1]<h[j]){
				t=g[j];
				g[j]=g[j-1];
				g[j-1]=t;
				e=h[j];
				h[j]=h[j-1];
				h[j-1]=e;
			}
		}
	}
	for(i=0;i<100;i++){
		if(h[i]!=-1){
		a=g[i]/n;
		b=g[i]%n;
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",k[a][0],k[a][1],k[a][2],k[b][0],k[b][1],k[b][2],h[i]);
		}
	}
		return 0;
		}
/*
 * juli.cpp
 *??: ?????????
 *  Created on: 2012-11-9
 *      Author: ??
 */

int main() {
	int n, i, j, k = 0, x[10], y[10], z[10], start[45], end[45];//??n???????????
	double dis[45];//????
	cin >> n;
	for (i = 0; i < n; i++)
		cin >> x[i] >> y[i] >> z[i];//??
	for (i = 0; i < n - 1; i++)
		for (j = i + 1; j < n; j++) {
			start[k] = i;
			end[k] = j;
			dis[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]));
			k++;//???????????????????????
		}
	for (i = 0; i < k - 1; i++)
		for (j = 0; j < k - i - 1; j++) {
			if (dis[j] < dis[j + 1]) {
				swap(dis[j], dis[j + 1]);
				swap(start[j], start[j + 1]);
				swap(end[j], end[j + 1]);//????
			}
		}
	for (i = 0; i < k; i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n", x[start[i]], y[start[i]],
				z[start[i]], x[end[i]], y[end[i]], z[end[i]], dis[i]);//?????
	return 0;
}
int main()
{
	int n, i, j, k = 0, t, x[10], y[10], z[10];
	double dis[10][9] = {0}, dist[50] = {0}, a;
	cin>>n;
	for (i = 0; i < n; i++)
	{
		cin>>x[i]>>y[i]>>z[i];
	}
	for (i = 0; i < n - 1; i++)
	{
		for (j = i + 1; j < n; j++)
		{
			dis[i][j-i-1] = 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]));
			dist[k++] = dis[i][j-i-1];
		}
	}
	for (k = 0; k < n * (n - 1) / 2; k++)
	{
		for (t = 0; t < n * (n - 1) / 2 - k - 1; t++)
		{
			if (dist[t] < dist[t + 1])
			{
				a = dist[t];
				dist[t] = dist[t + 1];
				dist[t + 1] = a;
			}
		}
	}
	for (k = 0; k < n * (n - 1) / 2; k++)
	{
		if (k >= 1 && dist[k] == dist[k - 1])
			continue;
		for (i = 0; i < n - 1; i++)
		{
			for (j = i + 1; j < n; j++)
			{
				if (dis[i][j-i-1] == dist[k])
				{
					cout<<'('<<x[i]<<','<<y[i]<<','<<z[i]<<')'<<'-'<<'('<<x[j]<<','<<y[j]<<','<<z[j]<<')'
						<<'='<<fixed<<setprecision(2)<<dist[k]<<endl;
				}
			}
		}
	}
	return 0;
}
int main(){
int zb[100][3],a,n,j,k,i;
double b,jl[100],t;
scanf("%d",&n);
for( i=0;i<n;i++){
	for(k=0;k<3;k++){
scanf("%d",&zb[i][k]);
	}
}
for(i=0;i<n;i++){
		for(j=i+1;j<n;j++){
	
jl[10*i+j]=0;
}
}


for(i=0;i<n;i++){ 
	for(j=i+1;j<n;j++){
		
	
		a=((zb[i][0]-zb[j][0])*(zb[i][0]-zb[j][0]))+((zb[i][1]-zb[j][1])*(zb[i][1]-zb[j][1]))+((zb[i][2]-zb[j][2])*(zb[i][2]-zb[j][2]));

		jl[10*i+j]=sqrt(a);
		}
}
while(1){
	t=0;
	for(i=0;i<n;i++){
		for(j=i+1;j<n;j++){
			if(jl[10*i+j]>t){
				t=jl[10*i+j];
			}
		}
	}
	if(t==0){
		break;
	}
	for(i=0;i<n;i++){
		for(j=i+1;j<n;j++){
			if(jl[10*i+j]==t){
				printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",zb[i][0],zb[i][1],zb[i][2],zb[j][0],zb[j][1],zb[j][2],t);
				jl[10*i+j]=0;
			}
		}
	}
	}
	return 0;
}
int main(){
    int n,c,a,b,i,o,p,k;
    double e;
    scanf("%d",&n);
    double jl[n][n];
    int x[n],y[n],z[n];
    k=n*(n-1)/2;
    for(i=0;i<n;i++){
        scanf("%d%d%d",&x[i],&y[i],&z[i]);
    }
    for(a=0;a<n;a++){
        b=a+1;
        while(b<n){
            jl[a][b]=sqrt((x[a]-x[b])*(x[a]-x[b])+(y[a]-y[b])*(y[a]-y[b])+(z[a]-z[b])*(z[a]-z[b]));
            b++;
        }
    }
    e=0;
    for(i=0;i<k;i++){
        for(a=0;a<n;a++){
        b=a+1;
          while(b<n){
            if(e<jl[a][b]){
                e=jl[a][b];
                o=a;
                p=b;
            }
                b++;
          }
        }
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[o],y[o],z[o],x[p],y[p],z[p],e);    
          jl[o][p]=0;
          e=0;
    }
    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 distance
{
	int p1[3];
	int p2[3];
	float dis;
}d[50],t;
int main()
{
	int n;
	cin>>n;
	int a[10][3];
	for(int i=0;i<n;i++)
		for(int j=0;j<3;j++)
			cin>>a[i][j];
	int p=0;
	for(int i=0;i<n;i++)
		for(int j=i+1;j<n;j++)
			{d[p].p1[0]=a[i][0];
	         d[p].p1[1]=a[i][1];
			 d[p].p1[2]=a[i][2];
			 d[p].p2[0]=a[j][0];
			 d[p].p2[1]=a[j][1];
			 d[p].p2[2]=a[j][2];
			 d[p].dis=sqrt(pow((double)(d[p].p1[0]-d[p].p2[0]),2)+pow((double)(d[p].p1[1]-d[p].p2[1]),2)+pow((double)(d[p].p1[2]-d[p].p2[2]),2));
			 p++;}
	for(int i=0;i<n*(n-1)/2;i++)
		for(int j=n*(n-1)/2-1;j>i;j--)
		{
			if(d[j].dis>d[j-1].dis){t=d[j];d[j]=d[j-1];d[j-1]=t;}
		}
	for(int i=0;i<n*(n-1)/2;i++)
		{printf("(%d,%d,%d)-(%d,%d,%d)=%.2f",d[i].p1[0],d[i].p1[1],d[i].p1[2],d[i].p2[0],d[i].p2[1],d[i].p2[2],d[i].dis);
	cout<<endl;}
	return 0;
}
//***********************************************************************
//???????
//??????? 
//??????
//***********************************************************************
int main()                                    //??? 
{
    double s[45], l;                          //??double????????
                                              //?????????????? 
    int n, k = 0, m[90][3], l1, l2, l3, l4, l5,l6, c[10][3];
    cin>>n;
    for(int i = 0; i < n; i++)                //for?????? 
            for(int j = 0; j < 3; j++)
                    cin>>c[i][j]; 
    for(int i = 0; i < n - 1; i++)            //for????????? 
            for(int j = i + 1; j < n; j++)
            {
                    s[k] = sqrt(pow(c[i][0] - c[j][0],2.0) + pow(c[i][1] - c[j][1],2.0)
                                +pow(c[i][2] - c[j][2],2.0));
                    
                    m[k][0] = c[i][0];
                    m[k][1] = c[i][1];
                    m[k][2] = c[i][2];
                    m[k + n * (n - 1) / 2][0] = c[j][0];
                    m[k + n *(n - 1) / 2][1] = c[j][1];
                    m[k + n *(n - 1) / 2][2] = c[j][2]; 
                    k++;
            } 
    for(int i = 1; i < k; i++)                //for???? 
            for(int j = 0; j < k - i; j++)
            {
                    if(s[j] < s[j + 1])
                    {
                            l = s[j];
                            l1 = m[j][0];
                            l2 = m[j][1];
                            l3 = m[j][2];
                            l4 = m[j + n * (n - 1) / 2][0];
                            l5 = m[j + n * (n - 1) / 2][1];
                            l6 = m[j + n * (n - 1) / 2][2];
                            s[j] = s[j + 1];
                            m[j][0] = m[j+1][0];
                            m[j][1] = m[j+1][1];
                            m[j][2] = m[j+1][2];
                            m[j + n * (n - 1) / 2][0] = m[j + n * (n - 1) / 2+1][0];
                            m[j + n * (n - 1) / 2][1] = m[j + n * (n - 1) / 2+1][1];
                            m[j + n * (n - 1) / 2][2] = m[j + n * (n - 1) / 2+1][2];
                            s[j + 1] = l;
                            m[j + 1][0] = l1;
                            m[j + 1][1] = l2;
                            m[j + 1][2] = l3;
                            m[j + n * (n - 1) / 2+1][0] = l4;
                            m[j + n * (n - 1) / 2+1][1] = l5;
                            m[j + n * (n - 1) / 2+1][2] = l6;
                    }
            }
    for(int i = 0; i < k; i++)                           //for???? 
            cout<<"("<<m[i][0]<<","<<m[i][1]<<","<<m[i][2]<<")-"<<"("<< m[i + n * (n - 1) / 2][0]
            <<","<< m[i + n * (n - 1) / 2][1]<<","<< m[i + n * (n - 1) / 2][2]<<")="<<fixed<<setprecision(2)<<s[i]<<endl;

    return 0;
}
int main(){
    int n,y;
    scanf("%d\n",&n);
    int x[1000][3];
    double jl[100][100],o;
    for(int i=0;i<n;i++){
        scanf("%d%d%d",&x[i][0],&x[i][1],&x[i][2]);
    }
    for(int i=0;i<n-1;i++){
        for(int k=i+1;k<n;k++){
            jl[i][k]=sqrt((x[i][0]-x[k][0])*(x[i][0]-x[k][0])+(x[i][1]-x[k][1])*(x[i][1]-x[k][1])+(x[i][2]-x[k][2])*(x[i][2]-x[k][2]));
        }
    }
    int m,p,q,a=0;
    m=n*(n-1)/2;
    for(int i=0;i<9;i++){
        if(a==m){
            break;
        }
        for(int k=i+1;k<10;k++){
            if(o<jl[i][k]){
                o=jl[i][k];
                p=i;
                q=k;
            }
            if(i==8&&k==9){
                printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[p][0],x[p][1],x[p][2],x[q][0],x[q][1],x[q][2],o);
                jl[p][q]=0;
                i=-1;
                o=0;
                a++;
            }
        }
    }
    return 0;
}
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));
}
int main(){
        int n,i,j,k,b,c;
        int x[10],y[10],z[10];
        double m[10][10],max=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=0;j<n;j++){
                m[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]));
                }
        }
        for(k=0;k<n*(n-1)/2;k++){
            for(i=0;i<n-1;i++){
            for(j=i+1;j<n;j++){
                if(max<m[i][j]){
                   max=m[i][j];
                   b=i;
                   c=j;
                   }
                }
             }
        if(max==0){break;}
        else{
            printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[b],y[b],z[b],x[c],y[c],z[c],max);
            m[b][c]=0;
            max=0;  
            }
        }
     return 0;
}
int point[10][3]={{0}};
float dis[10][10]={{0}};
float far[45]={0};

void bubblesort(int k)
{
	for (int i=0;i<=k-1;i++)
	{
		for (int j=k;j>i;j--)
		{
			float tmp;
			if (far[j]>far[j-1])
			{
				tmp=far[j];
				far[j]=far[j-1];
				far[j-1]=tmp;
			}
		}
	}
}
int main()
{
	int n;
	cin>>n;
	for (int i=0;i<=n-1;i++)
	{
		cin>>point[i][0]>>point[i][1]>>point[i][2];
	}
	int k=0;
	for (int i=0;i<=n-2;i++)
	{
		for (int j=i+1;j<=n-1;j++)
		{
			dis[i][j]=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])));
			far[k]=dis[i][j];
			k++;
		}
	}
	bubblesort(k);
	for (int p=0;p<=k-1;)
	{
	for (int i=0;i<=n;i++)
	{
		for (int j=i;j<=n-1;j++)
		{
			if (dis[i][j]==far[p])
			{
				cout<<"("<<point[i][0]<<","<<point[i][1]<<","<<point[i][2]<<")-("<<point[j][0]<<","<<point[j][1]<<","<<point[j][2]<<")=";
				printf("%.2f\n",far[p]);
				dis[i][j]=-1;
				goto loop;
			}
		}
	}
loop:p++;
	}
}
//**************************
//*????????        *
//*??????1000012797?*
//*?????2010?12?    *
//**************************
int main()
{
	int i=0,j,n,count=0;
	double a[10]={0},b[10]={0},c[10]={0};            //????a,b,c??????????????????
	cin>>n;                                  //????
	for(i=0;i<n;i++)
	{
		cin>>a[i]>>b[i]>>c[i];
	}                                           //??????
	struct dis                                    //???????????????
	{
		int x;
		int y;
		double len;
	}d[45],temp;
	for(i=0;i<n-1;i++)
	{
		for(j=i+1;j<n;j++)
		{
			d[count].x=i;
			d[count].y=j;
			d[count].len=sqrt(pow(a[i]-a[j],2)+pow(b[i]-b[j],2)+pow(c[i]-c[j],2));
			count++;
		}
	}                                    //?????
	j=n*(n-1)/2;
	for(;j>0;j--)
	{
		for(i=0;i<n*(n-1)/2-1;i++)
		{
			if(d[i].len<d[i+1].len){temp=d[i];d[i]=d[i+1];d[i+1]=temp;}
		}
	}                                             //?????
	for(i=0;i<n*(n-1)/2;i++)
	{
		cout<<"("<<(int)a[d[i].x]<<","<<(int)b[d[i].x]<<","<<(int)c[d[i].x]<<")"<<"-"<<"("<<(int)a[d[i].y]<<","<<(int)b[d[i].y]<<","<<(int)c[d[i].y]<<")"<<"=";
		cout<<fixed<<setprecision(2)<<d[i].len<<endl;
	}                                            //??
	return 0;                                  //??
}
/*
*12-1
*??? 1200012851
*2012.12.11
*????
**/


double dis(int x, int y, int z)
{
	double s;
	s = sqrt(x * x + y * y + z * z);
	return s;
}

int main()
{
	int x[10], y[10], z[10];
	struct distance
	{
		double d;
		int yi;
		int er;
	}d12[45], temp;
	int n, i, j, k = 0;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >> x[i] >> y[i] >> z[i];
	}
	for (i = 0; i < n - 1; i++)
	{
		for (j = i + 1; j < n; j++)
		{
			d12[k].d = dis(x[i] - x[j], y[i] - y[j], z[i] - z[j]);
			d12[k].yi = i;
			d12[k].er = j;
			k++;
		}
	}
	for (i = 1; i <= k - 1; i++)
		for (j = 0; j < k - i; j++)
		{
			if (d12[j].d < d12[j + 1].d)
			{
				temp = d12[j + 1];
				d12[j + 1] = d12[j];
				d12[j] = temp;
			}
		}
	for (i = 0; i < k; i++)
	{
		cout << "(" << x[d12[i].yi] << "," << y[d12[i].yi] << "," << z[d12[i].yi] << ")-("
			<< x[d12[i].er] << "," << y[d12[i].er] << "," << z[d12[i].er] << ")=" << fixed <<
			setprecision(2) << d12[i].d << endl;
	}
	return 0;
}
int main (){
	int n,i,j,a[10][3],b[100][3],c[100][3],k=0,e[100];
	double d[100],l[100],x=0,m[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		for(j=0;j<3;j++)
		{
			scanf("%d",&(a[i][j]));
		}
	}
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			d[k]=sqrt(1.0*((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])));
			b[k][0]=a[i][0];
			b[k][1]=a[i][1];
			b[k][2]=a[i][2];
			c[k][0]=a[j][0];
			c[k][1]=a[j][1];
			c[k][2]=a[j][2];
			k++;
		}
	}
	for(i=0;i<k;i++)
	{
		l[i]=d[i];
	}
	for(i=0;i<k;i++)
	{
		for(j=0;j<k;j++)
		{
			if(l[j]>x)
			{
				x=l[j];
				e[i]=j;
			}
		}
		l[e[i]]=0;
		x=0;
	}
	for(i=0;i<k;i++)
	{
		m[i]=d[e[i]];
	}


		
	for(i=0;i<k;i++)
	{
	     printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",b[e[i]][0],b[e[i]][1],b[e[i]][2],c[e[i]][0],c[e[i]][1],c[e[i]][2],m[i]);
	}

	return 0;
}
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);
}
int main(){
	int n;
	scanf("%d",&n);
	int x[100],y[100],z[100];
	double a[100][100],b[100];
	int i,j;
	for (i=0;i<n;i++){
		scanf("%d%d%d",&x[i],&y[i],&z[i]);
	}
	int q;
	q=0;
	for (j=0;j<n-1;j++){
		for(i=j+1;i<n;i++){
			a[j][i]=sqrt((x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i])+(z[j]-z[i])*(z[j]-z[i]));
			b[q]=a[j][i];
			q++;
		}
	}
	double e;
	int k;
	for(k=1;k<=q; k++){
		for(i=0;i<q-k; i++){
			if(b[i]>b[i+1]){
					e=b[i+1];
					b[i+1]=b[i];
					b[i]=e;
			}
		}
	}
	int c;
	c=0;
	double d[100];
	for(k=1;k<q;k++){
		if(b[k-1]!=b[k]){
			d[c]=b[k-1];
			c++;
		}
	}
	if(b[q-1]!=b[q-2]){
		d[c]=b[q-1];
		c++;
	}
	for(k=c-1;k>0; k--){
		for (j=0;j<n-1;j++){
			for(i=j+1;i<n;i++){
				if(d[k]==a[j][i]){
					printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[j],y[j],z[j],x[i],y[i],z[i],a[j][i]);			
				}
			}
		}
	}
	for (j=0;j<n-1;j++){
		for(i=j+1;i<n;i++){
			if(d[0]==a[j][i]){
				printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[j],y[j],z[j],x[i],y[i],z[i],a[j][i]);			
				}
			}
		}
	return 0;
}
int main(){
	int x[10];
	int y[10];
	int z[10];
	double c[10][10];
	double w[100];
	int k[50][4],l[50][4];
	int i,n,q,o,j,d=0,a,b;
	double m; 
 	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(q=i+1;q<n;q++){
			m=1.0*(x[i]-x[q])*(x[i]-x[q])+1.0*(y[i]-y[q])*(y[i]-y[q])+1.0*(z[i]-z[q])*(z[i]-z[q]);
            c[i][q]=(double)sqrt(m);
			d++;
			}
	}
	j=d;
	for(o=0;o<j;o++){
		w[o]=0;
		a=0;b=0;
       for(i=0;i<n-1;i++){
		for(q=i+1;q<n;q++){
			if(w[o]<c[i][q]){
				w[o]=c[i][q];
				a=i;
				b=q;
			}
		}
	   }
	   c[a][b]=-1;
	   k[o][1]=x[a];k[o][2]=y[a];k[o][3]=z[a];
	   l[o][1]=x[b];l[o][2]=y[b];l[o][3]=z[b];
	}

	for(o=0;o<d;o++){
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",k[o][1],k[o][2],k[o][3],l[o][1],l[o][2],l[o][3],w[o]);
	}
	return 0;
}