#include<bits/stdc++.h>

using namespace std;
const int N = 100010;
typedef long long ll;

int a[N];

int main()
{
	int t, n, x;
	cin >> t;
	while(t --)
	{
		ll sum = 0, mi, ma = 0;
		cin >> n >> x;
		for(int i = 0; i < n; i ++) {
			cin >> a[i];
			sum += a[i];
			ma += (a[i] + x - 1) / x;
		}
		mi = (sum + x - 1) / x;
		cout << mi << ' ' << ma << endl;
	}
	return 0;
}