semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()                                              //?????
{
	double a[11][4],b[46][7];                           //????:a[i][k]?i????j????b[][]???????
	double c[46],p;                                     //c[]??????????????p
	int i,j,k=0,n;                                      //????n,????i,j,k
	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++)
		{
			k++;
			c[k]=sqrt((a[i][1]-a[j][1])*(a[i][1]-a[j][1])+(a[i][2]-a[j][2])*(a[i][2]-a[j][2])+(a[i][3]-a[j][3])*(a[i][3]-a[j][3]));
			b[k][1]=a[i][1];
			b[k][2]=a[i][2];
			b[k][3]=a[i][3];
			b[k][4]=a[j][1];
			b[k][5]=a[j][2];
			b[k][6]=a[j][3];
		}
	}
	for(i=1;i<=k-1;i++)                                 //?????????????????
	{
		for(j=1;j<=k-i;j++)
		{
			if(c[j]<c[j+1])
			{
				p=c[j];
				c[j]=c[j+1];
				c[j+1]=p;
				p=b[j][1];
				b[j][1]=b[j+1][1];
				b[j+1][1]=p;
				p=b[j][2];
				b[j][2]=b[j+1][2];
				b[j+1][2]=p;
				p=b[j][3];
				b[j][3]=b[j+1][3];
				b[j+1][3]=p;
				p=b[j][4];
				b[j][4]=b[j+1][4];
				b[j+1][4]=p;
				p=b[j][5];
				b[j][5]=b[j+1][5];
				b[j+1][5]=p;
				p=b[j][6];
				b[j][6]=b[j+1][6];
				b[j+1][6]=p;
			}
		}
	}
	for(i=1;i<=k;i++)                                    //????????????????????
	    printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",(int)b[i][1],(int)b[i][2],(int)b[i][3],(int)b[i][4],(int)b[i][5],(int)b[i][6],c[i]);
	return 0;
}
int main()
{
int n,i,j,k=0;
double d[10][10]={0},D[45]={0},t;
struct point
{int x;
int y;
int z;
}p[10];
scanf("%d",&n);
for(i=0;i<n;i++)
{scanf("%d%d%d",&p[i].x,&p[i].y,&p[i].z);}
for(i=0;i<n-1;i++)
{for(j=i+1;j<n;j++)
{d[i][j]=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));
D[k]=d[i][j];
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]<D[j+1])
{t=D[j];
D[j]=D[j+1];
D[j+1]=t;}}}
for(k=0;k<n*(n-1)/2;k++)
{if(D[k]==D[k+1])
continue;
else
{for(i=0;i<n-1;i++)
{for(j=i+1;j<n;j++)
if(d[i][j]==D[k])
{printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",p[i].x,p[i].y,p[i].z,p[j].x,p[j].y,p[j].z,d[i][j]);}}}}
return 0;
}
int n, t = 1;
struct dian
{
	int x;
	int y;
	int z;
}a[11], *p = &a[1];
struct ju
{
	int p1;
	int p2;
	double d;
}b[100], temp;
void fsort(int k)
{
	int i;
	for(i = k + 1; i <= t; i++)
	{
		if(b[k].d < b[i].d)
		{
			temp = b[k];
			b[k] = b[i];
			b[i] = temp;
		}
	}
}
int main()
{
	int i, j;
	cin >> n;
	cout << fixed << setprecision(2);
	for(i = 1; i <= n; i++)
	{
		cin >> p->x >> p->y >> p->z;
		p++;
	}
	for(i = 1; i <= n - 1; i++)
	{	
		for(j = i + 1; j <= n; j++)
		{
			b[t].p1 = i;
			b[t].p2 = j;
			b[t].d = pow(pow(a[i].x - a[j].x, 2.0) + pow(a[i].y - a[j].y, 2.0) + pow(a[i].z - a[j].z, 2.0), 0.5);
			t++;
		}
	}
	t--;
	for(i = 1; i < t; i++)
	{
		fsort(i);
	}
	for(i = 1; i < t; i++)
	{
		if(b[i].d == b[i + 1].d)
		{
			if(b[i].p1 > b[i + 1].p1)
			{
				temp = b[i + 1];
				b[i + 1] = b[i];
				b[i] = temp;
			}
			else
			{
				if(b[i].p1 == b[i + 1].p1 && b[i].p2 > b[i + 1].p2)
				{
					temp = b[i + 1];
					b[i + 1] = b[i];
					b[i] = temp;
				}
			}
		}
	}
	for(i = 1; i <= t; i++)
	{
		cout << "(" << a[b[i].p1].x << "," << a[b[i].p1].y << "," << a[b[i].p1].z << ")" << "-" << "(" << a[b[i].p2].x << "," << a[b[i].p2].y << "," << a[b[i].p2].z << ")" << "=" << b[i].d << endl;
	}
	return 0;
}
const int N=10;
int n,m,x[N],y[N],z[N];
int p1[N*N/2],p2[N*N/2];
int main()
{
    cin>>n;
    for (int i=0;i<n;i++)
        cin>>x[i]>>y[i]>>z[i];
    m=0;
    for (int i=0;i<n;i++)
        for (int j=i+1;j<n;j++)
        {
            p1[m]=i;
            p2[m++]=j;
        }
    for (int i=0;i<m;i++)
        for (int j=0;j<m-1;j++)
        {
            //int &c1=p1[j],&c2=p2[j],&d1=p1[j+1],&d2=p2[j+1];
            int c1=p1[j],c2=p2[j],d1=p1[j+1],d2=p2[j+1];
            if ((x[c1]-x[c2])*(x[c1]-x[c2])+(y[c1]-y[c2])*(y[c1]-y[c2])+(z[c1]-z[c2])*(z[c1]-z[c2])<
                (x[d1]-x[d2])*(x[d1]-x[d2])+(y[d1]-y[d2])*(y[d1]-y[d2])+(z[d1]-z[d2])*(z[d1]-z[d2]))
            {
                /*int temp;
                temp=c1;
                c1=d1;
                d1=temp;
                temp=c2;
                c2=d2;
                d2=temp;*/
                    int temp;
                    temp=p1[j];
                    p1[j]=p1[j+1];
                    p1[j+1]=temp;
                    temp=p2[j];
                    p2[j]=p2[j+1];
                    p2[j+1]=temp;
            }
        }
    for (int i=0;i<m;i++)
    {
        int c1=p1[i],c2=p2[i];
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[c1],y[c1],z[c1],x[c2],y[c2],z[c2],sqrt(((double)x[c1]-(double)x[c2])*((double)x[c1]-(double)x[c2])+((double)y[c1]-(double)y[c2])*((double)y[c1]-(double)y[c2])+((double)z[c1]-(double)z[c2])*((double)z[c1]-(double)z[c2])));
    }
    return 0;
}
int main() {
	int X[120], Y[120], Z[120], I[1020], J[1020];
	double R2[1020], mid;
	int n;
	int i, x, y, z, a, b, pai, mi;
	cin >> n;
	for (i = 1; i <= n; i++) {
		cin >> x >> y >> z;
		X[i] = x;
		Y[i] = y;
		Z[i] = z;

	}
	int r = 1;
	for (a = 1; a <= n; a++) {
		for (b = 2; b <= n; b++) {
			if (b <= a) {
				continue;
			}
			I[r] = a;
			J[r] = b;
			R2[r] = (X[a] - X[b]) * (X[a] - X[b]) + (Y[a] - Y[b]) * (Y[a]
					- Y[b]) + (Z[a] - Z[b]) * (Z[a] - Z[b]);
			r++;
		}
	}

	pai = n * (n - 1) / 2 + 1;
	while (pai--) {
		for (i = 1; i < r - 1; i++) {
			if (R2[i] < R2[i + 1]) {
				mid = R2[i];
				R2[i] = R2[i + 1];
				R2[i + 1] = mid;
				mi = J[i];
				J[i] = J[i + 1];
				J[i + 1] = mi;
				mi = I[i];
				I[i] = I[i + 1];
				I[i + 1] = mi;
			}

		}
	}

	for (i = 1; i <= n * (n - 1) / 2; i++) {
		R2[i] = sqrt(R2[i]);

		cout << "(" << X[I[i]] << "," << Y[I[i]] << "," << Z[I[i]] << ")-("
				<< X[J[i]] << "," << Y[J[i]] << "," << Z[J[i]] << ")=" << fixed
				<< setprecision(2) << R2[i] << endl;
	}
	return 0;
}
int main(){
    int n,i,j,k,f;
    k=0;
    int x[10];
    int y[10];
    int z[10];
    int m[50][6];
    double r[50];
    double e;
    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=n-1;j>i;j--){
            r[k]=sqrt(1.0*((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])+(z[i]-z[j])*(z[i]-z[j])));
            m[k][0]=x[i];
            m[k][1]=y[i];
            m[k][2]=z[i];
            m[k][3]=x[j];
            m[k][4]=y[j];
            m[k][5]=z[j];
            k++;
        }
    }
    for(i=1;i<=n*(n-1)/2;i++){
        for(j=0;j<n*(n-1)/2-i;j++){
            if(r[j]>=r[j+1]){
               e=r[j+1];
               r[j+1]=r[j];
               r[j]=e;
               f=m[j+1][0];
               m[j+1][0]=m[j][0];
               m[j][0]=f;
               f=m[j+1][1];
               m[j+1][1]=m[j][1];
               m[j][1]=f;
               f=m[j+1][2];
               m[j+1][2]=m[j][2];
               m[j][2]=f;
               f=m[j+1][3];
               m[j+1][3]=m[j][3];
               m[j][3]=f;
               f=m[j+1][4];
               m[j+1][4]=m[j][4];
               m[j][4]=f;
               f=m[j+1][5];
               m[j+1][5]=m[j][5];
               m[j][5]=f;
            }
        }
    }
    for(i=n*(n-1)/2-1;i>=0;i--){
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",m[i][0],m[i][1],m[i][2],m[i][3],m[i][4],m[i][5],r[i]);
    }
	return 0;
}
int main()
{
    struct distance
    {
        int num;
        int x[4];
        int y[4];
        double d;
    }a[N*(N-1)/2],t;

    double dis(int x[3],int y[3]);

    int p[N][3];
    int n,i,j,r,k;

    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        for(j=0;j<3;j++)
        {
            scanf("%d",&p[i][j]);
        }
    }

    for(i=0,r=0;i<n-1;i++)
    {
        for(j=i+1;j<n;j++)
        {

            a[r].d=dis(p[i],p[j]);
            //printf("%.2lf\n",a[r].d);
            for(k=0;k<3;k++)
            {
                a[r].x[k]=p[i][k];
                a[r].y[k]=p[j][k];
            }

            a[r].x[3]=i;
            a[r].y[3]=j;

            r++;
        }
    }

    n=r;

    for(i=0;i<n-1;i++)
    {
        for(j=0;j<n-i-1;j++)
        {
            if(a[j].d<a[j+1].d)
            {
                t=a[j];
                a[j]=a[j+1];
                a[j+1]=t;
            }

            else if(a[j].d==a[j+1].d)
            {
                if(a[j].x[3]>a[j+1].x[3])
                {
                    t=a[j];
                    a[j]=a[j+1];
                    a[j+1]=t;
                }
            }
        }
    }

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

    return 0;


}

double dis(int x[3],int y[3])
{
    double z=0;
    int i;

    for(i=0;i<3;i++)
    {
        z=z+1.0*(y[i]-x[i])*(y[i]-x[i]);
    }

    z=sqrt(z);

    return z;
}
void main()
{
	int n,i,j,k,y,z;
	int a[10],b[10],c[10],p[45],q[45];
	float m[45],x,t;
	scanf("%d",&n);
	for (i=0;i<n;i++)
		scanf("%d%d%d",&a[i],&b[i],&c[i]);
	k=0;
	for (i=0;i<n-1;i++)
	{
		for (j=i+1;j<n;j++)
		{
			x=(a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j])+(c[i]-c[j])*(c[i]-c[j]);
			p[k]=i;
			q[k]=j;
			m[k]=sqrt(x);
			k++;
		}
	}
	for (i=k-1;i>=0;i--)
	{
		for (j=k-1;j>=k-i-1;j--)
		{
			if (m[j+1]>m[j])
			{
				t=m[j];
				m[j]=m[j+1];
				m[j+1]=t;
				y=p[j];
				p[j]=p[j+1];
				p[j+1]=y;
				z=q[j];
				q[j]=q[j+1];
				q[j+1]=z;
			}
		}
	}
	for (i=0;i<k;i++)
	{
		y=p[i];
		z=q[i];
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",a[y],b[y],c[y],a[z],b[z],c[z],m[i]);
	}
}
int main()
{
	int n,i,j,a[80],b[80],k=0,m,code1,code2;
	double x[13],y[13],z[13],S[80],t;
	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++)//????Cn2
		{
			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]=i;b[k]=j;
			k++;//
		}
    for(i=0;i<k;i++)
		for(j=k-1;j>i;j--)//?????
			if(S[j]>S[j-1])
			{
				t=S[j];
				S[j]=S[j-1];
				S[j-1]=t;//????
				m=a[j];
				a[j]=a[j-1];
				a[j-1]=m;//???????
				m=b[j];
				b[j]=b[j-1];
				b[j-1]=m;//???????
			}
    for(i=0;i<k;i++)
	{
		code1=a[i];code2=b[i];
		cout<<"("<<(int)x[code1]<<","<<(int)y[code1]<<","<<(int)z[code1]<<")-("<<(int)x[code2]<<","<<(int)y[code2]<<","<<(int)z[code2]<<")=";
		cout<<fixed<<setprecision(2);
		cout<<S[i]<<endl;
	}
	return 0;
}
int main()
{

  int x[10],X1[45],X2[45],xjl[45];
  int y[10],Y1[45],Y2[45],yjl[45];
  int z[10],Z1[45],Z2[45],zjl[45];
  int he[45];
  double juli[45];
 
  int n, i;
  scanf("%d", &n);
  for(i=0;i<n;i++){
	  scanf("%d%d%d",&(x[i]),&(y[i]),&(z[i]));
  }
  int m,f=0; 
 
  for(m=0 ; m < n-1 ; m++){
	for(i = m+1; i < n ; i++){
			xjl[f]=(x[m]-x[i])*(x[m]-x[i]);
			yjl[f]=(y[m]-y[i])*(y[m]-y[i]);
            zjl[f]=(z[m]-z[i])*(z[m]-z[i]);
			X1[f]=x[m];
			X2[f]=x[i];
			Y1[f]=y[m];
			Y2[f]=y[i];
			Z1[f]=z[m];
			Z2[f]=z[i];

			f++;
	}
  }
 
  for(m=0 ; m < f ; m++){
	he[m]=xjl[m]+yjl[m]+zjl[m];
  }
  for(m=0 ; m < f ; m++){
	  
	juli[m]=sqrt(he[m]);

  }
 

  double e;
  int h;
  for(m=1 ; m < f ; m++){
	for(i = 0; i < f - m; i++){
			if(juli[i] < juli[i+1]){
					e = juli[i+1];
					juli[i+1] = juli[i];
					juli[i] = e;
					h = X1[i+1];
					X1[i+1] = X1[i];
				    X1[i] = h;
					h = X2[i+1];
					X2[i+1] = X2[i];
					X2[i] = h;
					h = Y1[i+1];
					Y1[i+1] = Y1[i];
					Y1[i] = h;
					h = Y2[i+1];
					Y2[i+1] = Y2[i];
					Y2[i] = h;
					h = Z1[i+1];
					Z1[i+1] = Z1[i];
					Z1[i] = h;
					h = Z2[i+1];
					Z2[i+1] = Z2[i];
					Z2[i] = h;
				
			}
	}
  }

   
  for(m=0;m<f;m++){
  printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",X1[m],Y1[m],Z1[m],X2[m],Y2[m],Z2[m],juli[m]);
  }

  
  return 0;
}
struct node
{
    int x,y,z;
}p[10];
struct d
{
    double d;
    int p1,p2;
}dis[45];
int n,t=0;

double dist(int x,int y)
{
    int dx=p[x].x-p[y].x,dy=p[x].y-p[y].y,dz=p[x].z-p[y].z;
    return sqrt(1.0*dx*dx+1.0*dy*dy+1.0*dz*dz);
}

void swap(int i,int j)
{
    struct d tmp=dis[i];
    dis[i]=dis[j];
    dis[j]=tmp;
}

void init()
{
    int i,j;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d%d%d",&p[i].x,&p[i].y,&p[i].z);
    }
    for(i=0;i<n;i++)
    {
        for(j=i+1;j<n;j++)
        {
            dis[t].p1=i;dis[t].p2=j;
            dis[t].d=dist(i,j);
            t++;
        }
    }
}

void solve()
{
    int i,j;
    for(i=0;i<t;i++)
    {
        for(j=0;j<t-i-1;j++)
        {
            if(dis[j].d<dis[j+1].d)
            {
                swap(j,j+1);
            }
        }
        
    }
}

void print()
{
    int i;
    for(i=0;i<t;i++)
    {
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",p[dis[i].p1].x,p[dis[i].p1].y,p[dis[i].p1].z,
                                 p[dis[i].p2].x,p[dis[i].p2].y,p[dis[i].p2].z,dis[i].d);
    }
}

int main()
{
    init();
    solve();
    print();
    return 0;
}
int main(){
int n,i,j,k,t;
int x[101],y[101],z[101],a[46],b[46];
double d[46],t1;
scanf("%d",&n);
for (i=1;i<=n;i++)
scanf("%d%d%d",&x[i],&y[i],&z[i]);
k=0;
for (i=1;i<=n-1;i++)
for (j=i+1;j<=n;j++){
	k=k+1; 
	d[k]=sqrt(1.0*(x[i]-x[j])*(x[i]-x[j])+1.0*(y[i]-y[j])*(y[i]-y[j])+1.0*(z[i]-z[j])*(z[i]-z[j]));
    a[k]=i;
	b[k]=j;
}
for (i=1;i<=k;i++)
for (j=1;j<=k-i;j++)
if (d[j]<d[j+1])
{
t1=d[j];
d[j]=d[j+1];
d[j+1]=t1;
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=1;i<=k;i++)
printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\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 k,i,n,t,o,p,q=0;
	int x[100],y[100],z[100],one[100],two[100];
	double e,sz[100];
	scanf("%d",&n);
     for(i=0;i<n;i++)
	{
		scanf("%d%d%d",&x[i],&y[i],&z[i]);
	}
	 for(i=0;i<n-1;i++)
	 {
		 for(p=i+1;p<n;p++)
		 {
             sz[q]=sqrt((x[i]-x[p])*(x[i]-x[p])+(y[i]-y[p])*(y[i]-y[p])+(z[i]-z[p])*(z[i]-z[p]));
			 one[q]=i;two[q]=p;
             q++;
		 }
	 }
     	for(k=1;k<q+1;k++)
	{
		for(i=0;i<q-k;i++)
		{
			if(sz[i]<sz[i+1])
			{
				e=sz[i+1];t=one[i+1];o=two[i+1];
				sz[i+1]=sz[i];one[i+1]=one[i];two[i+1]=two[i];
				sz[i]=e;one[i]=t;two[i]=o;
			}
		}
	}
		for(i=0;i<q;i++)
		{
			printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[(one[i])],y[(one[i])],z[(one[i])],x[(two[i])],y[(two[i])],z[(two[i])],sz[i]);
		}
	return 0;
}
int main()
{
	int x[10],y[10],z[10],x1[45],y1[45],z1[45],x2[45],y2[45],z2[45],n,m,i,j,k,l,h;
	double s[45],e;
	scanf("%d",&n);
	m=n*(n-1)/2;
	for(i=0;i<n;i++)
		scanf("%d %d %d",&x[i],&y[i],&z[i]);
	l=0;
	for(j=0;j<n-1;j++){
		for(k=j+1;k<n;k++){
            x1[l]=x[j];y1[l]=y[j];z1[l]=z[j];
			x2[l]=x[k];y2[l]=y[k];z2[l]=z[k];
			s[l]=sqrt((x[j]-x[k])*(x[j]-x[k])+(y[j]-y[k])*(y[j]-y[k])+(z[j]-z[k])*(z[j]-z[k]));
			l++;
		}

	}
	for(j=1;j<=m;j++){
		for(k=0;k<m-j;k++){
			if(s[k]<s[k+1]){
				e=s[k];s[k]=s[k+1];s[k+1]=e;
				h=x1[k];x1[k]=x1[k+1];x1[k+1]=h;
				h=y1[k];y1[k]=y1[k+1];y1[k+1]=h;
				h=z1[k];z1[k]=z1[k+1];z1[k+1]=h;
				h=x2[k];x2[k]=x2[k+1];x2[k+1]=h;
				h=y2[k];y2[k]=y2[k+1];y2[k+1]=h;
				h=z2[k];z2[k]=z2[k+1];z2[k+1]=h;
			}
		}
	}
	for(i=0;i<m;i++)
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x1[i],y1[i],z1[i],x2[i],y2[i],z2[i],s[i]);
	return 0;
}
struct zuobiao
{
	int x,y,z;
}zuo[10];
struct dis
{
	int left[3],right[3];
	float d;
}di[100],e;
int main()
{
	int l,n,ld,i,j;
	scanf("%d",&n);
	l=n*(n-1)/2;
	ld=0;
	for(i=0;i<n;i++)
		scanf("%d%d%d",&zuo[i].x,&zuo[i].y,&zuo[i].z);
	for(i=0;i<n-1;i++)
		for(j=i+1;j<n;j++)
		{
			di[ld++].d=sqrt(pow(zuo[i].x-zuo[j].x,2)+pow(zuo[i].y-zuo[j].y,2)+pow(zuo[i].z-zuo[j].z,2));
			di[ld-1].left[0]=zuo[i].x;
			di[ld-1].left[1]=zuo[i].y;
			di[ld-1].left[2]=zuo[i].z;
			di[ld-1].right[0]=zuo[j].x;
			di[ld-1].right[1]=zuo[j].y;
			di[ld-1].right[2]=zuo[j].z;
		}
		for(i=1;i<l;i++)
			for(j=0;j<l-i;j++)
				if(di[j].d<di[j+1].d)
				{
					e=di[j];
					di[j]=di[j+1];
					di[j+1]=e;
				}
				for(i=0;i<l;i++)
					printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",di[i].left[0],di[i].left[1],di[i].left[2],di[i].right[0],di[i].right[1],di[i].right[2],di[i].d);
				
				
				
				
				
				
				return 0;
}
int main(){   int n,i,j,t,t2,t3;
	double t1;
	int zb[10][3];
	double d[60];
	int flag[60][2];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		for(j=0;j<3;j++){
			scanf("%d",&zb[i][j]);
		}
	}
	t=0;
	for(i=0;i<n;i++){
		for(j=i+1;j<n;j++){
			d[t]=sqrt(1.0*((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])));
			flag[t][0]=i;
			flag[t][1]=j;
			t++;
		}
	}
	for(j=0;j<t-1;j++){
		for(i=0;i<t-j-1;i++){
			if(d[i]<d[i+1]){
				t1=d[i];
				d[i]=d[i+1];
				d[i+1]=t1;
				t2=flag[i][0];
				flag[i][0]=flag[i+1][0];
				flag[i+1][0]=t2;
				t3=flag[i][1];
				flag[i][1]=flag[i+1][1];
				flag[i+1][1]=t3;
			}
		}
	}
	for(i=0;i<t;i++){
		printf("(%d,%d,%d)",zb[flag[i][0]][0],zb[flag[i][0]][1],zb[flag[i][0]][2]);
		printf("-");
		printf("(%d,%d,%d)",zb[flag[i][1]][0],zb[flag[i][1]][1],zb[flag[i][1]][2]);
		printf("=%.2f",d[i]);
		printf("\n");
	}
	return 0;
}
double distance(int xa,int ya,int za,int xb,int yb,int zb);
double distance(int xa,int ya,int za,int xb,int yb,int zb){
    int sum;
    double dis;
    sum=(xb-xa)*(xb-xa)+(yb-ya)*(yb-ya)+(zb-za)*(zb-za);
    dis=sqrt(sum);
    return dis;
}

int main(){
    int n,i,t,j,b=0,w=0,te;
    double td;
    scanf("%d",&n);
    struct point{
        int x,y,z;
    }point[10];
    for(i=0;i<n;i++)
    scanf("%d %d %d",&point[i].x,&point[i].y,&point[i].z);
    struct{
        int p,q;
        double dist;
    }temp[45];
    for(i=0;i<45;i++)
    temp[i].dist=-1;
    for(i=0;i<n;i++)
        for(j=0;j<i;j++){
            temp[w].p=i;
            temp[w].q=j;
            temp[w].dist=distance(point[i].x,point[i].y,point[i].z,point[j].x,point[j].y,point[j].z);
            w=w+1;
        }
        
for(i=0;i<45;i++)
    for(w=0;w<44;w++)
        if(temp[w].dist<temp[w+1].dist)
        {
            te=temp[w+1].p;
            temp[w+1].p=temp[w].p;
            temp[w].p=te;
            te=temp[w+1].q;
            temp[w+1].q=temp[w].q;
            temp[w].q=te;    
            td=temp[w+1].dist;
            temp[w+1].dist=temp[w].dist;
            temp[w].dist=td;
        }
        

    for(w=0;w<45;w++){
    if(temp[w].p>temp[w].q){
        te=temp[w].q;
        temp[w].q=temp[w].p;
        temp[w].p=te;
    }
        if(temp[w].dist!=-1)
        {
            printf("(%d,%d,%d)-",point[temp[w].p].x,point[temp[w].p].y,point[temp[w].p].z);
            printf("(%d,%d,%d)=",point[temp[w].q].x,point[temp[w].q].y,point[temp[w].q].z);
            printf("%.2lf\n",temp[w].dist);
        }
    }
    return 0;
}
main()
{
    int a,b,c,n,m,l,p,q;
    double k;
    int x[10][3];
    double y[10][10];
    double z[10][10];
    scanf("%d",&n);
    for(a=0;a<=9;a++)
    {
        for(b=0;b<=9;b++)
        y[a][b]=-1;
    }
    for(a=0;a<=n-1;a++)
    {
        for(b=0;b<=2;b++)
        scanf("%d",&x[a][b]);
    }
    for(a=0;a<=n-1;a++)
    {
        for(b=a+1;b<=n-1;b++)
        y[a][b]=sqrt((x[a][0]-x[b][0])*(x[a][0]-x[b][0])+(x[a][1]-x[b][1])*(x[a][1]-x[b][1])+(x[a][2]-x[b][2])*(x[a][2]-x[b][2]));
    }
    for(a=0;a<=9;a++)
    {
        for(b=0;b<=9;b++)
        z[a][b]=y[a][b];
    }
    for(a=1;a<=(((n*n)/2)-(n/2));a++)
    {
        k=-1;
        m=-1;
        l=-1;
        for(b=0;b<=n-1;b++)
        {
            for(c=0;c<=n-1;c++)
            {
                if(y[b][c]>k)
                {
                    m=b;
                    l=c;
                    k=y[b][c];
                }
                else;
            }
        }
        y[m][l]=-1;
        printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x[m][0],x[m][1],x[m][2],x[l][0],x[l][1],x[l][2],z[m][l]);
    }
}
void main()
{
int n,m,a[11][3],i,j,k,l;
double b[46][3],s,t;
scanf("%d",&n);
m=n*(n-1)/2;
for(i=0;i<n;i++)
{
	scanf("%d %d %d",&a[i][0],&a[i][1],&a[i][2]);
}
i=0;
for(j=0;j<n-1;j++)
{
	for(k=j+1;k<=n-1;k++)
	{
		s=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]));
		b[i][0]=j;
		b[i][1]=k;
		b[i][2]=s;
		i++;
	}
}
for(i=m-1;i>0;i--)
{
	for(j=0;j<i;j++)
	{
		if(b[j][2]<b[j+1][2])
		{
			for(l=0;l<=2;l++)
			{
				t=b[j+1][l];
			    b[j+1][l]=b[j][l];
			    b[j][l]=t;
			}
		}
		else if(fabs(b[j][2]-b[j+1][2])<1e-6&&b[j][0]>b[j+1][0])
		{
			for(l=0;l<=2;l++)
			{
				t=b[j+1][l];
			    b[j+1][l]=b[j][l];
			    b[j][l]=t;
			}
		}
		else if(fabs(b[j][2]-b[j+1][2])<1e-6&&b[j][0]==b[j+1][0]&&b[j][1]>b[j+1][1])
		{
			for(l=0;l<=2;l++)
			{
				t=b[j+1][l];
			    b[j+1][l]=b[j][l];
			    b[j][l]=t;
			}
		}
	}
}
for(i=0;i<m;i++)
{
	printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",a[(int)b[i][0]][0],a[(int)b[i][0]][1],a[(int)b[i][0]][2],a[(int)b[i][1]][0],a[(int)b[i][1]][1],a[(int)b[i][1]][2],b[i][2]);
}
}
int sq(int a,int b)
{ int r;
  r=(a-b)*(a-b);
  return(r);
}

float dis(int a[3],int b[3])
{ int  i;
  float s=0;
  for(i=0;i<3;i++)
    s+=sq(a[i],b[i]);
  s=sqrt(s);
  return(s);

}


void main()
{ int n,i,a[10][3],t=0,k,j,p;
  float s[50][3],r;

  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++)
	{ s[t][0]=i;
      s[t][1]=j;
	  s[t][2]=dis(a[i],a[j]);
	  t++;
	}
  
  for(j=1;j<=t-1;j++)
	  for(i=0;i<t-j;i++)
		  if(s[i][2]<s[i+1][2]) 
		    for(p=0;p<3;p++)
			 { r=s[i][p];s[i][p]=s[i+1][p];s[i+1][p]=r; }

  for(i=0;i<t;i++)
  { j=s[i][0];
    k=s[i][1];
   
	printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",a[j][0],a[j][1],a[j][2],a[k][0],a[k][1],a[k][2],s[i][2]);
  }



 
}
int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	int x[10],y[10],z[10];
	int i,j;
	for(i=0;i<n;i++){
		scanf("%d%d%d",&x[i],&y[i],&z[i]);
	}
	float l[46];
	int p1[46];
	int p2[46];
	int zz=0;
	for(i=0;i<n-1;i++){
		for(j=i+1;j<n;j++){
			l[zz]=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]));
			p1[zz]=i;
			p2[zz]=j;
			zz++;
		}

	}
	float lamp2;
	int lamp;
	for(i=0;i<zz;i++){
		for(j=i+1;j<zz;j++){
			if(l[j]>l[i]){
				lamp2=l[j];
				l[j]=l[i];
				l[i]=lamp2;
				lamp=p1[j];
				p1[j]=p1[i];
				p1[i]=lamp;
				lamp=p2[j];
				p2[j]=p2[i];
				p2[i]=lamp;
			}
			if(l[j]==l[i]){
				if(p1[i]>p1[j]||(p1[i]==p1[j]&&p2[i]>p2[j])){
				lamp2=l[j];
				l[j]=l[i];
				l[i]=lamp2;
				lamp=p1[j];
				p1[j]=p1[i];
				p1[i]=lamp;
				lamp=p2[j];
				p2[j]=p2[i];
				p2[i]=lamp;
			}}
		}
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2f\n",x[p1[i]],y[p1[i]],z[p1[i]],x[p2[i]],y[p2[i]],z[p2[i]],l[i]);
	}

	return 0;
}
int main(){
	int n,c=0;
	double j[100],k;
	scanf("%d",&n);
	int x[100],y[100],z[100],x1[100],y1[100],z1[100],x2[100],y2[100],z2[100];
    for(int b=0;b<n;b++){
		scanf("%d%d%d",&x[b],&y[b],&z[b]);
	}

	
	for(int p=0;p<n;p++){
		for( int l=p+1;l<n;l++){
			k=((x[p]-x[l])*(x[p]-x[l])+(y[p]-y[l])*(y[p]-y[l])+(z[p]-z[l])*(z[p]-z[l]))*1.0;
				j[c]=sqrt(k);
			    x1[c]=x[p];y1[c]=y[p];z1[c]=z[p];
				x2[c]=x[l];y2[c]=y[l];z2[c]=z[l];
                         c++;

		}
	}
	

    for(int a=1;a<=n*(n-1)/2;a++){
		double e;
    for(int i=0;i<n*(n-1)/2-a;i++){
    if(j[i]<j[i+1]){
    e=j[i+1];
    j[i+1]=j[i];
    j[i]=e;
       int f;
     f=x1[i+1];
    x1[i+1]=x1[i];
    x1[i]=f;
	f=y1[i+1];
    y1[i+1]=y1[i];
    y1[i]=f;
	f=z1[i+1];
    z1[i+1]=z1[i];
    z1[i]=f;

    f=x2[i+1];
    x2[i+1]=x2[i];
    x2[i]=f;
	f=y2[i+1];
    y2[i+1]=y2[i];
    y2[i]=f;
	f=z2[i+1];
    z2[i+1]=z2[i];
    z2[i]=f;

	}
	}
	}
	for(int i=0;i<n*(n-1)/2;i++){
		printf("(%d,%d,%d)-(%d,%d,%d)=%.2lf\n",x1[i],y1[i],z1[i],x2[i],y2[i],z2[i],j[i]);
	}
return 0;
	}