#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>

using namespace std;
int T,N,X,A[100010];
int main(){
	scanf("%d",&T);
	while(T--){
		scanf("%d%d",&N,&X);
		for(int i=1;i<=N;i++)
			scanf("%d",&A[i]);
		long long mn=0,mx=0;
		for(int i=1;i<=N;i++){
			mn+=A[i];
			mx+=(A[i]+X-1)/X;
		}
		printf("%lld %lld\n",(mn+X-1)/X,mx);
	}
	return 0;
} 