#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long int
#define ld long double
const ll M=1e9+7;

void solve(int lol)
{
	ll n,x;
	cin>>n>>x;
	ll arr[n];
	for(int i=0;i<n;i++)cin>>arr[i];

	ll mn=0,mx=0;
	for(int i=0;i<n;i++)
	{
		mn+=arr[i];
		mx+=arr[i]/x+(arr[i]%x!=0);
	}
	mn=mn/x+(mn%x!=0);
	cout<<mn<<" "<<mx<<endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	ll t=1;
	cin>>t;
	for(int i=1;i<=t;i++)
		solve(i);
}