#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(NULL);
	int t;
	cin>>t;
	while(t--)
	{
		ll n,x;
		ll min=0,max=0,s=0;
		cin>>n>>x;
		ll a[n];
		for(ll i=0;i<n;i++)
		{
			cin>>a[i];
			s+=a[i];
			if(a[i]%x==0)
            max+=(a[i]/x);
            else
            max+=((a[i]/x)+1);
        }
		    if(s%x==0)
            min+=(s/x);
            else
            min+=((s/x)+1);
		cout<<min<<" "<<max<<endl;
	}
	return 0;
}