ll@N,L=5e17,x,y,s,t,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){s=1e18;rep(u,N)rep(v,u+1,N){C=A;f(u,v);t=max[i,0,N](m(i));t+=max[i,0,N@m(i)t)s=t,x=u,y=v;}s=get<2>(A[x]);t=get<2>(A[y]);wt(s,t);C=A;f(x,y);A=C;N--;}