semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int a[1001][1001],b[1001][1001],c[1001][1001];
double s[1000001][3];
struct {
       double x,y,z;
}point[10001];
double dis(int i,int j)//???? 
{
       return 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));
}
void change(int n)//??? 
{
     double temp;
     temp=s[n][0];
     s[n][0]=s[n+1][0];
     s[n+1][0]=temp;
     temp=s[n][1];
     s[n][1]=s[n+1][1];
     s[n+1][1]=temp;
     temp=s[n][2];
     s[n][2]=s[n+1][2];
     s[n+1][2]=temp;
}
void print (int n)//?? 
{
     int lt=(int)(s[n][1]),rt=(int)(s[n][2]);
     cout<<"("<<point[lt].x<<','<<point[lt].y<<','<<point[lt].z<<")";
     cout<<'-';
     cout<<"("<<point[rt].x<<','<<point[rt].y<<','<<point[rt].z<<")";
     cout<<'=';
     printf("%.2f\n",s[n][0]);
}
void bubblesort(int k)//?? 
{
 	 int i,j;
 	 for(i=1;i<k;i++)
    for(j=1;j<=k-i;j++)
    if(s[j][0]<s[j+1][0])
    change(j);
}
int main()
{
    int n,m;
    cin>>n;
    int i,j,k;
    for(i=1;i<=n;i++)
    cin>>point[i].x>>point[i].y>>point[i].z;
    k=1;
    for(i=1;i<=n;i++)
    for(j=i+1;j<=n;j++){
                        s[k][0]=dis(i,j);
                        s[k][1]=i;
                        s[k][2]=j;
                        k++;
                        }
    k--;
	bubblesort(k);
	for(i=1;i<=k;i++)
    print(i);
    return 0;
}
int main(){
    struct point{
           int x,y,z;
           }points[10];
    double d[45],e,a;
    int n,i,j,k=0;    
    scanf("%d",&n);
    for(i=0;i<n;i++){
            scanf("%d %d %d",&points[i].x,&points[i].y,&points[i].z);
            }
    for(i=0;i<n;i++){
                     for(j=i+1;j<n;j++){
                                        a=1.0*(points[i].x-points[j].x)*(points[i].x-points[j].x)+1.0*(points[i].y-points[j].y)*(points[i].y-points[j].y)+1.0*(points[i].z-points[j].z)*(points[i].z-points[j].z);                                     
                                        d[k]=sqrt(a);
                                        k++;
                                        }
                                        }
    for(k=0;k<n*(n-1)/2;k++){
            for(i=0;i<n*(n-1)/2-1-k;i++){
			                        if(d[i]<d[i+1]){
					                                    e=d[i+1];
				                                        d[i+1]=d[i];
		                                                d[i]=e;
			                                            }
	                                 }
                           }
    for(k=1;k<n*(n-1)/2;k++){
                     if(d[k]==d[k-1]){
                                      d[k-1]=0;
                                      }
                                      }
    for(int b=0;b<n*(n-1)/2;b++){
             for(i=0;i<n;i++){
                     for(j=i+1;j<n;j++){
                                        a=1.0*(points[i].x-points[j].x)*(points[i].x-points[j].x)+1.0*(points[i].y-points[j].y)*(points[i].y-points[j].y)+1.0*(points[i].z-points[j].z)*(points[i].z-points[j].z);
                                        e=sqrt(a);                                        
                                        if(d[b]==e){
                                                    printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",points[i].x,points[i].y,points[i].z,points[j].x,points[j].y,points[j].z,d[b]);
                                                    }
                                                    
                                        }
                     }
    }                                       
    return 0;
}
/*
 *????SortTheDistance.cpp
 *?????
 *????: 2012-11-13
 *?????????????????????????????
 */


int main(){
	int x[15], y[15], z[15], left[50], right[50];
	int n, i, j, k = 0, gn, temp1;
	double dis[50], temp;

	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >> x[i] >> y[i] >> z[i];
	}

	for (i = 0; i < n; i++)
	{
		for (j = i + 1; j < n; j++)
		{
			left[k] = i;
			right[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++;
		}
	}
	gn = k;
	for (i = 0; i < gn; i++)
	{
		for (j = 0; j < gn - i - 1; j++)
		{
			if(dis[j + 1] > dis[j])
			{
				temp = dis[j];
				dis[j] = dis[j + 1];
				dis[j + 1] = temp;
				temp1 = left[j];
				left[j] = left[j + 1];
				left[j + 1] = temp1;
				temp1 = right[j];
				right[j] = right[j + 1];
				right[j + 1] = temp1;
			}
		}
	}

	for (i = 0; i < gn; i++)
	{
		cout << "(" << x[left[i]] << "," << y[left[i]] << "," << z[left[i]] << ")-(" ;
		cout << x[right[i]] << "," << y[right[i]] << "," << z[right[i]] << ")=" << fixed << setprecision(2) << dis[i] << endl;
	}
	return 0;
}
int main()
{
	int n,i,j,k=0,l;
	double a[102][4],b[102][102],c[2000]={0};
	cin>>n;
	for(i=1;i<=n;i++)
	{
		for(j=1;j<=3;j++)
		{
			cin>>a[i][j];
		}
	}
	for(i=1;i<=n-1;i++)
	{
		for(j=i+1;j<=n;j++)
		{
			b[i][j]=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][3]-a[j][3])*(a[i][3]-a[j][3]));
			c[k]=b[i][j];
			k++;
		}
	}
	sort(c,c+n*(n-1)/2);
    for(k=n*(n-1)/2-1;k>=0;k--)
	{if(c[k+1]==c[k])continue;
	for(i=1;i<=n-1;i++)
		{
			for(j=i+1;j<=n;j++)
			{	
				
					if(b[i][j]==c[k])
					{cout<<"("<<a[i][1]<<","<<a[i][2]<<","<<a[i][3]<<")-("<<a[j][1]<<","<<a[j][2]<<","<<a[j][3]<<")=";
				     printf("%.2f",c[k]);
					 cout<<endl;}
				
				
			}
		}
	}
	

	
	return 0;
}
int main()
{
    int n,a[200],b[200],c[200],i,j,h[200],l[200],t=1,q,z;
    double d[200],k;
    cin>>n;
    for(i=1;i<=n;i++)
    {
		cin>>a[i]>>b[i]>>c[i];
	}
	for(i=1;i<=n-1;i++)
	{
		for(j=i+1;j<=n;j++)
		{
			d[t]=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]));
			h[t]=i;
			l[t]=j;
			t++;
		}
	}
	for(i=1;i<=n*(n-1)/2-1;i++)
	{
		for(j=1;j<=n*(n-1)/2-i;j++)
		{
			if(d[j]<d[j+1])
			{
				k=d[j];
				d[j]=d[j+1];
				d[j+1]=k;
				z=h[j];
				h[j]=h[j+1];
				h[j+1]=z;
				z=l[j];
				l[j]=l[j+1];
				l[j+1]=z;
				
			}
		}
	}
	for(i=1;i<=n*(n-1)/2;i++)
	{
		cout<<"("<<a[h[i]]<<","<<b[h[i]]<<","<<c[h[i]]<<")-("<<a[l[i]]<<","<<b[l[i]]<<","<<c[l[i]]<<")=";
		printf("%.2f\n",d[i]);
	}
	cin>>q;
	return 0;
}
double f(int a[3], int b[3]);
int main(){
	int n,zb[M][3],dw[N][2],i,k;
	double jl[N];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		for(k=0;k<3;k++){
			scanf("%d",&zb[i][k]);
		}
	}
	int count=0;
	for(i=0;i<n-1;i++){
		for(k=i+1;k<n;k++){
			jl[count]=f(zb[i],zb[k]);
			dw[count][0]=i;
			dw[count][1]=k;
			count++;
		}
	}
	double e0;
	int e;
	for(k=1;k<count;k++){
		for(i=0;i<count-k;i++){
			if(jl[i]<jl[i+1]){
				e0=jl[i];
				jl[i]=jl[i+1];
				jl[i+1]=e0;
				e=dw[i][0];
				dw[i][0]=dw[i+1][0];
				dw[i+1][0]=e;
				e=dw[i][1];
				dw[i][1]=dw[i+1][1];
				dw[i+1][1]=e;
			}
		}
	}
	int x,y;
	for(i=0;i<count;i++){
		x=dw[i][0];
		y=dw[i][1];
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",zb[x][0],
		zb[x][1],zb[x][2],zb[y][0],zb[y][1],zb[y][2],jl[i]);
	}
	return 0;
}

double f(int a[3], int b[3]){
	int sum,c;
	double result;
	sum=0;
	c=a[0]-b[0];
	sum+=c*c;
	c=a[1]-b[1];
	sum+=c*c;
	c=a[2]-b[2];
	sum+=c*c;
	result=sqrt(sum);
	return result;
}
int main()
{
    int n,t,i,j,k,x[110],y[110],z[110],a[500],aa[500],b[500],bb[500],c[500],cc[500],l;
    double s[110],ty;
    scanf("%d",&n);
    k=0;  
     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++)
       { s[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]=(x[i]);
         b[k]=(y[i]);
         c[k]=(z[i]);
         aa[k]=(x[j]);
         bb[k]=(y[j]);
         cc[k]=(z[j]);
         
           k++;
       }

           for (i=k-1;i>0;i--)
       for(j=0;j<i;j++)
         if (s[j+1]>s[j])
         {
             ty=s[j+1];
             
             s[j+1]=s[j];
             s[j]=ty;
              t=a[j+1];
             a[j+1]=a[j];
             a[j]=t;
              t=b[j+1];
             b[j+1]=b[j];
             b[j]=t;
              t=c[j+1];
             c[j+1]=c[j];
             c[j]=t;
              t=aa[j+1];
             aa[j+1]=aa[j];
             aa[j]=t;
              t=bb[j+1];
             bb[j+1]=bb[j];
             bb[j]=t;
              t=cc[j+1];
             cc[j+1]=cc[j];
             cc[j]=t;
         }
        
         for (i=0;i<k;i++)
         printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",a[i],b[i],c[i],aa[i],bb[i],cc[i],s[i]);
      return 0;
}
float dist(int a,int b,int c,int a1,int b1,int c1);
int toi(int fi,int ni);
int toj(int fj,int nj);

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

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

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

int toj(int fj,int nj)
{
	int aj,testfj,qj;
	testfj=fj;
	qj=1;
	do
	{
		if(testfj-(nj-qj)<=0)
		{
			aj=testfj+qj-1;
			break;
		}
		else
		{
			testfj-=nj-qj;
			qj++;
		}
	}while(qj<nj);
	return(aj);
}
void main()
{
	int n,i,j,t,l=0;
	int x[20],y[20],z[20],d1[100],d2[100];
	float d[100],temp;
	scanf("%d",&n);
	for (i=1;i<=n;i++)
		scanf("%d%d%d",&x[i],&y[i],&z[i]);
	for (i=1;i<n;i++)
		for (j=i+1;j<=n;j++)
		{
			l++;
			d[l]=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]));
			d1[l]=i;d2[l]=j;
		}
	for (i=1;i<n*(n-1)/2;i++)
		for (j=1;j<n*(n-1)/2;j++)
			if (d[j]<d[j+1])
				{temp=d[j];d[j]=d[j+1];d[j+1]=temp;
				t=d1[j];d1[j]=d1[j+1];d1[j+1]=t;
				t=d2[j];d2[j]=d2[j+1];d2[j+1]=t;}
	for (i=1;i<=n*(n-1)/2;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",x[d1[i]],y[d1[i]],z[d1[i]],x[d2[i]],y[d2[i]],z[d2[i]],d[i]);
}
int main()
{
	struct sanwei
	{
		int x;
		int y;
		int z;
	}room[10];
	int n, i, j;
	double dis[100];
	int x1[100], x2[100], y1[100], y2[100], z1[100], z2[100];
	int k = 1;
	cin >> n;
	for(i = 0; i < n; i++)
		cin >> room[i].x >> room[i].y >> room[i].z;
	for(i = 0; i < n; i++)
		for(j = i + 1; j < n; j++)
		{
		    x1[k] = room[i].x;
	        y1[k] = room[i].y;
		    z1[k] = room[i].z;
			x2[k] = room[j].x;
			y2[k] = room[j].y;
			z2[k] = room[j].z;
			dis[k] = ((x1[k] - x2[k]) * (x1[k] - x2[k]) + (y1[k] - y2[k]) * (y1[k] - y2[k]) + (z1[k] - z2[k]) * (z1[k] - z2[k]));
			dis[k] = sqrt(dis[k]);
			k++;
		}
    double temp;
	for(i = 1; i <= n * (n - 1) / 2; i++)
	{
		for(j = n * (n - 1) / 2; j >= 1 + i	; j--)
		{
            if(dis[j] > dis[j - 1])
			{
				temp = dis[j - 1];
				dis[j - 1] = dis[j];
				dis[j] = temp;
				temp = x1[j - 1];
				x1[j - 1] = x1[j];
				x1[j] = temp;
				temp = x2[j - 1];
				x2[j - 1] = x2[j];
				x2[j] = temp;				
				temp = y1[j - 1];
				y1[j - 1] = y1[j];
				y1[j] = temp;
				temp = y2[j - 1];
				y2[j - 1] = y2[j];
				y2[j] = temp;
				temp = z1[j - 1];
				z1[j - 1] = z1[j];
				z1[j] = temp;
				temp = z2[j - 1];
				z2[j - 1] = z2[j];
				z2[j] = temp;
			}
		}
	}
    for(i = 1; i <= n * (n - 1) / 2; i++)
		cout << "(" << x1[i] << "," << y1[i] << "," << z1[i] << ")-(" << x2[i] << "," << y2[i] << "," << z2[i] << ")=" << fixed << setprecision(2) << dis[i] << endl;
	return 0;
}
int main()
{
	int n,a[10][3],i,j,d[45][2][2],k=0,c,x,y;
	double z;
	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++)
		{
			d[k][0][0]=i;
			d[k][0][1]=j;
			d[k][1][1]=(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]);
			k++;

		}
	}
	for(i=0;i<n*(n-1)/2-1;i++)
	{
		for(j=0;j<n*(n-1)/2-i-1;j++)
		{
			if(d[j][1][1]<d[j+1][1][1])
			{
				c=d[j][0][0];
				d[j][0][0]=d[j+1][0][0];
				d[j+1][0][0]=c;
				c=d[j][0][1];
				d[j][0][1]=d[j+1][0][1];
				d[j+1][0][1]=c;
				c=d[j][1][1];
				d[j][1][1]=d[j+1][1][1];
				d[j+1][1][1]=c;
			}

		}
	}
	for(i=0;i<n*(n-1)/2;i++)
	{
		z=sqrt(d[i][1][1]*1.0);
		x=d[i][0][0];
		y=d[i][0][1];
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",
			a[x][0],a[x][1],a[x][2]
			,a[y][0],a[y][1],a[y][2]
			,z);
	}


	return 0;
}
int main()
{
	int n;
	cin>>n;
	int i,j,k,r,t;
	double s;
	int x[11],y[11],z[11];
	for(i=1;i<=n;i++)
	{
		
		cin>>x[i]>>y[i]>>z[i];
	}
	
	double w[100];
	int p[100],q[100];
	i = 1;
	int d=n*(n-1)/2;
	for(j = 1;j < n;j++)
		{
			for (k = j+1;k<= n;k++)
			{
		       w[i]=sqrt(pow((x[j]-x[k]),2.0)+pow((y[j]-y[k]),2.0)+pow((z[j]-z[k]),2.0));
			   p[i]=j;
			   q[i]=k;
			   i++;
	
			}
		}
	for(j=1;j<d;j++)
	{
		for(i=1;i<=d-j;i++)
		{
		if(w[i]<w[i+1])
		{
			s=w[i];
			w[i]=w[i+1];
			w[i+1]=s;
			r=p[i];
			p[i]=p[i+1];
			p[i+1]=r;
			t=q[i];
			q[i]=q[i+1];
			q[i+1]=t;

		}
		}

	}
	for(i=1;i<=d;i++)
		cout<<"("<<x[p[i]]<<","<<y[p[i]]<<","<<z[p[i]]<<")-"<<"("<<x[q[i]]<<","<<y[q[i]]<<","<<z[q[i]]<<")="<<fixed<<setprecision(2)<<w[i]<<endl;
	return 0;
}
double distance(int x1, int y1, int z1, int x2, int y2, int z2){
 double q,s;
 q=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+(z1-z2)*(z1-z2);
 s=sqrt(q);
 return s;
}
int main(){
int n,k,i,j,x[10],y[10],z[10];
double sz[46][7];
 scanf("%d",&n);
 for(i=0;i<n;i++){
scanf("%d%d%d",&x[i], &y[i], &z[i]);
}
 k=0;
 for(i=0;i<n-1;i++){
  for(j=i;j<n-1;j++){
   sz[k][0]=x[i]*1.0;
   sz[k][1]=y[i]*1.0;
   sz[k][2]=z[i]*1.0;
   sz[k][3]=x[j+1]*1.0;
   sz[k][4]=y[j+1]*1.0;
   sz[k][5]=z[j+1]*1.0;
   sz[k][6]=distance(x[i],y[i],z[i],x[j+1],y[j+1],z[j+1]);
   k++;
}
}
  for(i=0;i<k-1;i++){
   for(j=0;j<k-i-1;j++){
if(sz[j][6]<sz[j+1][6]){
     sz[45][0]=sz[j+1][0];
     sz[45][1]=sz[j+1][1];
     sz[45][2]=sz[j+1][2];
     sz[45][3]=sz[j+1][3];
     sz[45][4]=sz[j+1][4];
     sz[45][5]=sz[j+1][5];
     sz[45][6]=sz[j+1][6];
     sz[j+1][0]=sz[j][0];
     sz[j+1][1]=sz[j][1];
     sz[j+1][2]=sz[j][2];
     sz[j+1][3]=sz[j][3];
     sz[j+1][4]=sz[j][4];
     sz[j+1][5]=sz[j][5];
     sz[j+1][6]=sz[j][6];
     sz[j][0]=sz[45][0];
     sz[j][1]=sz[45][1];
     sz[j][2]=sz[45][2];
     sz[j][3]=sz[45][3];
     sz[j][4]=sz[45][4];
     sz[j][5]=sz[45][5];
     sz[j][6]=sz[45][6];
}
}
}
  for(i=0;i<k;i++){
   printf("(%.0lf,%.0lf,%.0lf)-(%.0lf,%.0lf,%.0lf)=%.2lf\n",sz[i][0], sz[i][1], sz[i][2], sz[i][3], sz[i][4], sz[i][5], sz[i][6]);
}
return 0;
}
int main()
{
    int i,j,n,x[10],y[10],z[10],xc,yc,zc,k=0,x1s[55],y1s[55],z1s[55],x2s[55],y2s[55],z2s[55];
	double e,s[55];
	scanf("%d\n",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&x[i]);
		scanf("%d",&y[i]);
		scanf("%d",&z[i]);
	}
	for(i=0;i<n-1;i++)
		for(j=i+1;j<n;j++)
		{
			xc=x[i]-x[j];
			yc=y[i]-y[j];
			zc=z[i]-z[j];
			s[k]=sqrt(xc*xc+yc*yc+zc*zc);
			x1s[k]=x[i]; x2s[k]=x[j];
			y1s[k]=y[i]; y2s[k]=y[j];
			z1s[k]=z[i]; z2s[k]=z[j];
			k++;
		}
	for(j=n*(n-1)/2-1;j>0;j--)
		for(i=0;i<j;i++)
			if(s[i]<s[i+1])
			{
				e=s[i];  s[i]=s[i+1];  s[i+1]=e;
				e=x1s[i];  x1s[i]=x1s[i+1];  x1s[i+1]=e;
				e=y1s[i];  y1s[i]=y1s[i+1];  y1s[i+1]=e;
				e=z1s[i];  z1s[i]=z1s[i+1];  z1s[i+1]=e;
				e=x2s[i];  x2s[i]=x2s[i+1];  x2s[i+1]=e;
				e=y2s[i];  y2s[i]=y2s[i+1];  y2s[i+1]=e;
				e=z2s[i];  z2s[i]=z2s[i+1];  z2s[i+1]=e;
			}
	for(k=0;k<n*(n-1)/2;k++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x1s[k],y1s[k],z1s[k],x2s[k],y2s[k],z2s[k],s[k]);
    return 0;
}
void main()
{
	int a[101],aa[101],aaa[101];
	int b[101],bb[101],bbb[101];
	int c[101],cc[101],ccc[101];
	int i,j,k=0,n,t;
	double d [101];
	double t2;
	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=0;j<n-i-1;j++)
		{
			d[k]=sqrt((a[i]-a[j+i+1])*(a[i]-a[j+i+1])+(b[i]-b[j+i+1])*(b[i]-b[j+i+1])+(c[i]-c[j+i+1])*(c[i]-c[j+i+1]));
		
			aa[k]=a[i];
			bb[k]=b[i];
			cc[k]=c[i];
			aaa[k]=a[j+i+1];
			bbb[k]=b[j+i+1]; 
			ccc[k]=c[j+i+1];
			k++;
		}
	}
	for (i=0;i<k;i++)
	{
		for (j=0;j<k-i-1;j++)
		{
			if (d[j]<d[j+1])
			{
				t2=d[j];
				d[j]=d[j+1];
				d[j+1]=t2;
				t=aa[j];
				aa[j]=aa[j+1];
				aa[j+1]=t;
				t=bb[j];
				bb[j]=bb[j+1];
				bb[j+1]=t;
				t=cc[j];
				cc[j]=cc[j+1];
				cc[j+1]=t;
				t=aaa[j];
				aaa[j]=aaa[j+1];
				aaa[j+1]=t;
				t=bbb[j];
				bbb[j]=bbb[j+1];
				bbb[j+1]=t;
				t=ccc[j];
				ccc[j]=ccc[j+1];
				ccc[j+1]=t;
			}
		}
	}
	for (i=0;i<k;i++)
	{
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",aa[i],bb[i],cc[i],aaa[i],bbb[i],ccc[i],d[i]);
	}

}
int main()
{
	double s[10][3],a[100],b[100];         //?s????n?????
	double l[100];
	int n;
	int i,j,k=0,g=0,c,d;
	double t;
	cin>>n;
	for(i=0;i<n;i++)
		for(j=0;j<3;j++)
			cin>>s[i][j];
	for(i=0;i<n-1;i++)
	{
		for(g=i+1;g<n;g++)
		{
			l[k]=sqrt((s[i][0]-s[g][0])*(s[i][0]-s[g][0])+(s[i][1]-s[g][1])*(s[i][1]-s[g][1])+(s[i][2]-s[g][2])*(s[i][2]-s[g][2]));
			a[k]=i;
			b[k]=g;
		    k++;
		}
	}                                     
	k=k;                   //l????k????
	for(i=0;i<k-1;i++)
		for(j=0;j<k-i;j++)
		{
			if(l[j]<l[j+1])
			{
				t=l[j+1];
				l[j+1]=l[j];
				l[j]=t;            //?????
				t=0;
				t=a[j+1];
				a[j+1]=a[j];
				a[j]=t;           
				t=0;
				t=b[j+1];
				b[j+1]=b[j];
				b[j]=t;           //??a?b?????l?????
			}
		}
		for(i=0;i<k;i++)
		{
			c=a[i];
			d=b[i];
			cout<<"("<<s[c][0]<<","<<s[c][1]<<","<<s[c][2]<<")-("<<s[d][0]<<","<<s[d][1]<<","<<s[d][2]<<")=";
			printf("%.2f",l[i]);
			if(i<k-1)
            cout<<endl;
		}

	
	return 0;
}
int main()
{
	int n=0,k=0,j=0,count=0;//?????????
	float x[10],y[10],z[10],d[45];//???????
	int name[45][3];//??????????
	cin>>n;
	for(k=0;k<n;k++)//????
	{
		cin>>x[k]>>y[k]>>z[k];
	}
	for(k=0;k<n-1;k++)//????
	{
		for(j=k+1;j<n;j++)
		{
			d[count]=sqrt((x[k]-x[j])*(x[k]-x[j])+(y[k]-y[j])*(y[k]-y[j])+(z[k]-z[j])*(z[k]-z[j]));//??
			name[count][1]=k;//??
			name[count][2]=j;//??
			count++;
		}
	}
	for(k=0;k<count-1;k++)//?????
		for(j=0;j<count-1-k;j++)
			if(d[j]<d[j+1])
			{
				float a;
				a=d[j];d[j]=d[j+1];d[j+1]=a;
				a=name[j][1];name[j][1]=name[j+1][1];name[j+1][1]=a;
				a=name[j][2];name[j][2]=name[j+1][2];name[j+1][2]=a;
			}
	for(k=0;k<count;k++)//??
	{
		cout<<"("<<x[name[k][1]]<<","<<y[name[k][1]]<<","<<z[name[k][1]]<<")-("<<x[name[k][2]]<<","<<y[name[k][2]]<<","<<z[name[k][2]]<<")=";
		printf("%.2f\n",d[k]);
	}
	return 0;
}
int main(){
	int n,i,j,k,t,m,pair;
	double e;
	double sz[10][3],num[45][7];
    scanf("%d",&n);
	pair=n*(n-1)/2;
	for(i=0;i<n;i++){
		for(j=0;j<3;j++){
	    scanf("%lf",&sz[i][j]);
		}
	}
	m=0;
	for(i=0;i<n-1;i++){
		for(j=i+1;j<n;j++){
			for(k=0;k<3;k++){
			num[m][k]=sz[i][k];
			}
			for(t=3;t<6;t++){
			num[m][t]=sz[j][t-3];
			}
			num[m][6]=sqrt((num[m][0]-num[m][3])*(num[m][0]-num[m][3])+(num[m][1]-num[m][4])*(num[m][1]-num[m][4])+(num[m][2]-num[m][5])*(num[m][2]-num[m][5]));
			m++;
		}
	}
	for(k=1;k<=pair;k++){
		for(i=0;i<pair-k;i++){
			if(num[i][6]<num[i+1][6]){
				for(t=0;t<7;t++){
                e=num[i+1][t];
			    num[i+1][t]=num[i][t];
		       	num[i][t]=e;
				}
			}
		}
	}
	for(t=0;t<pair;t++){
	printf("(%.0lf,%.0lf,%.0lf)-(%.0lf,%.0lf,%.0lf)=%.2lf\n",(num[t][0]),(num[t][1]),(num[t][2]),(num[t][3]),(num[t][4]),(num[t][5]),(num[t][6]));
	}
return 0;
}
struct dist
{
	int i;
	int j;
	float d;
}d[45];//??i?j?????

struct node
{
	int x;
	int y;
	int z;
}a[10];//????????

void main()
{
	int n,i,j,count=0;
	struct dist temp;//????????
	scanf("%d",&n);
	for(i=0;i<45;i++) d[i].d=0.0;//????
	for(i=0;i<n;i++)
		scanf("%d %d %d",&a[i].x,&a[i].y,&a[i].z);//???
	for(i=0;i<n-1;i++)
		for(j=i+1;j<n;j++)
		{
			d[count].i=i;
			d[count].j=j;
			d[count].d=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));
			count++;
		}//??i?j?????
	count=n*(n-1)/2;
	for(i=0;i<count-1;i++)
		for(j=0;j<count-i-1;j++)
		{
			if(d[j].d<d[j+1].d)
			{
				temp=d[j];
				d[j]=d[j+1];
				d[j+1]=temp;
			}
		}//????
	for(i=0;i<count;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",a[d[i].i].x,a[d[i].i].y,a[d[i].i].z,a[d[i].j].x,a[d[i].j].y,a[d[i].j].z,d[i].d);
}
int main(){
	int a[10][3];
	int n;
	int i,j,k;
	double ans[100];
	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*n+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 max = 1;
		for(i = 0;i<n;++i){
			for(j = i+1;j<n;++j){
				if(ans[i*n+j] > ans[max])max = i*n+j;
			}	
		}
		//(1,1,0)-(1,1,1)=1.00
		cout<<"("<<a[max/n][0]<<","<<a[max/n][1]<<","<<a[max/n][2]<<")-("
		<<a[max%n][0]<<","<<a[max%n][1]<<","<<a[max%n][2]<<")="
		<<fixed<<setprecision(2)<<ans[max]<<endl;	
		ans[max] = -9999999;
	}
	
	
	
	cin>>i;
	return 0;
}
float sqr(float x)
{
      float ans;
      ans=x*x;return(ans);
      }

float work(float a[3],float b[3])
{
      float ans;
      ans=sqrt(sqr(a[0]-b[0])+sqr(a[1]-b[1])+sqr(a[2]-b[2]));
      return(ans);
}

int main()
{
    int n,i,j,x,num;
    int a[101][3]={0};
    float dis[101]={0},d[11][3],x1;
    scanf("%d",&n);
    for (i=0;i<n;i++)
     for (j=0;j<3;j++)
      scanf("%f",&d[i][j]);
    num=0;
    for (i=0;i<n;i++)
     for (j=i+1;j<n;j++)
     {dis[num]=work(d[i],d[j]);a[num][1]=i;a[num][2]=j;num++;}
    for (i=0;i<num-1;i++)
     for (j=0;j<num-1;j++)
     if (dis[j]<dis[j+1])
      {x1=dis[j];dis[j]=dis[j+1];dis[j+1]=x1;
       x=a[j][1];a[j][1]=a[j+1][1];a[j+1][1]=x;
       x=a[j][2];a[j][2]=a[j+1][2];a[j+1][2]=x;}
    for (i=0;i<num;i++)
    {x=a[i][1];j=a[i][2];
     printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",(int)d[x][0],(int)d[x][1],(int)d[x][2],(int)d[j][0],(int)d[j][1],(int)d[j][2],dis[i]);}

}
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 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[n];
    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);
	}

	double a[n * (n - 1) / 2];//??????
	int k = 0;
	for (i = 0; i < n; i++) {
		for (j = i + 1; j < n; j++) {
			int t = 0;
			while (t < k + 1 && (a[t] - Distance(p[i], p[j]) > 0.00001
					|| Distance(p[i], p[j]) - a[t] > 0.00001))
				//?????double????????????????????????????
				t++;
			if (t == k + 1) {
				a[k] = Distance(p[i], p[j]);
				k++;
			}
			//Output(p[i],p[j]);
		}
	}//????????????????????
	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;
			}
		}
	}//??a[]??
	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)//a[k]==Distance(p[i],p[j])
						printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n\n", p[i]->x, p[i]->y, p[i]->z, p[j]->x, p[j]->y,
									p[j]->z, Distance(p[i], p[j]));
				} else {
					if (Distance(p[i], p[j]) - a[k] < 0.000001)//a[k]==Distance(p[i],p[j])
						Output(p[i], p[j]);
				}//float???????????????????
			}
		}
		k++;
	}
}