ll@N,@K,@A[N],x=0; sort(A,A+N); rep(i,N){if(K>=A[i))K-=A[i],x++;else{break;}} wt(x,K);