ll n,a[2d3],b[2d3],d[3d3];{rd(n,(a,b)(n));sortA(n,b,a);d[1..n]=1d12;rrep(i,n)rrep(j,n)d[j+1]