#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second

signed 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;
		int arr[n];
		int s=0;
		int ans=0;
		for(int i=0; i<n; i++){
			cin >> arr[i];
			ans += (arr[i]+x-1)/x;
			s += arr[i];
		}
		s = (s+x-1)/x;
		cout << s << " " << ans << "\n";
	}


	
	

	return 0;
}