#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
	ll T, n, x, *a, i, ans1, ans2;
	cin >> T;
	while (T--)
	{
		cin >> n >> x;
		a = new ll[n];
		for (i = 0, ans1 = 0, ans2 = 0; i < n; i++)
		{
			cin >> a[i];
			ans1 += a[i];
			ans2 += (a[i] + x - 1) / x;
		}
		ans1 = (ans1 + x - 1) / x;
		cout << ans1 << " " << ans2 << endl;
	}
}