a[1010],i,n,m,s=1e5,t,p,q; c(int*a,int*b){t=*a-*b;} main(){ for(scanf("%d%d",&n,&m);~scanf("%d",a+q);q++); for(qsort(a,q,4,c);i<=m-n;i++){ p=a[i];q=a[i+n-1]; t=(abs(p)