ll@N,L=5e17,x,y,p,q;vector>A(N),C;rep(i,N){auto&[a,b,j]=A[i];rd(a,b);j=i+1;}auto f=[&](ll u,ll v){auto&[a,b,i]=C[u];auto&[c,d,j]=C[v];a=(a+c)/2;b=(b+d)/2;C.erase(C.begin()+v);};auto m=[&](ll i){p=abs(get<0>(C[i])-L),q=abs(get<1>(C[i])-L);return max(p,q);};wt(N-1);REP(N-1){double s=1e40,t,z;rep(u,N)rep(v,u+1,N){C=A;f(u,v);t=sum[i,0,N]((z=m(i))**2);if(s>t)s=t,x=u,y=v;}p=get<2>(A[x]);q=get<2>(A[y]);wt(p,q);C=A;f(x,y);A=C;N--;}