ll n,r,s,t,x,y,a[2d3],b[2d3],c[2d3],d[2d3],e[2d3]; { rd(n,(a,b)(n)); rep(i,n){ rep(j,i){ x=a[j]-a[i]; y=b[j]-b[i]; if(y<0|!y&0>x)(x,y)*=-1; c[j]=x; d[j]=y; e[j]=y?MD*x/y:2d13; } sortA(i,e,c,d); s=t=0; rep(j,i){ r+=t*c[j]-s*d[j]; s+=c[j]; t+=d[j]; } } wt(r%MD); }