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

typedef long long ll;
typedef pair<int,int> ii;

void solve(){
	int n; cin >> n;
	ll x; cin >> x;
	ll maxi = 0, mini = 1e18;
	ll s = 0;
	for (int i=0; i<n; i++){
		ll ai; cin >> ai;
		ll divi = (ai + x -1)/x;
		maxi += divi;
		s += ai;
	}
	mini = (s+x-1)/x;
	cout << mini << ' ' << maxi << '\n';
}

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int t = 1; cin >> t;
	while(t--) solve();

	return 0;
}
// NK
