#include <bits/stdc++.h>
using namespace std;

#define ll long long int
#define fi first
#define se second
#define pb push_back
#define mod 1000000007
#define inf (int)1e9
typedef pair<int, int> pii; 

int main(){
// 	#ifndef ONLINE_JUDGE
// 		freopen("input.txt", "r", stdin);	
// 		freopen("output.txt","w", stdout);
// 	#endif
	int t;
	cin>>t;
	while(t--){
		int n,x;
		cin>>n>>x;
		ll a[n],sum=0,s=0;
		for (int i = 0; i < n; ++i)
		{
			cin>>a[i];
			sum+=a[i];
			s+=ceil(1.0*a[i]/x);
		}
		ll mi=ceil(1.0*sum/x),mx=s;
		cout<<mi<<" "<<mx<<"\n";
	}
	return 0;
}
