p,q,i,l,r;a[5000];main(n){ for(scanf("%d",&n);~scanf("%d",a+i++);); for(i=1;i<=2*n-3;++i){ l=i>1; for(p=l;p<=r;++p){ q=i-p; if(a[p]>a[q]){ a[p]^=a[q]^=a[p]^=a[q]; } } } for(i=0;i