#include <bits/stdc++.h>
#define ll long long 
#define ios ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;

void solve()
{
    ll n,x,i,f=0,s=0,ans=0,c=0;
    cin>>n>>x;
    int a[n];
    for(i=0;i<n;i++)
    {
        cin>>a[i];
        s+=a[i];
        ans+=(a[i]+x-1)/x;
    }
    cout<<(s+x-1)/x<<" "<<ans<<"\n";
    
}
int main()
{
	ios;
	int t;
	cin>>t;
	for(;t--;)
	{
	    solve();
	}
    return 0;
}