#include<iostream>
using namespace std;
#include<cmath>
int main()
{
    int t,n,i,a;
    long long x,max,min;
    cin>>t;
    while(t--)
    {
        max=min=0;
        cin>>n>>x;
        for(i=1;i<=n;i++)
        {
            cin>>a;
            max+=ceil(double(a)/x);
            min+=a;
        }
        min=ceil(double(min)/x);
        cout<<min<<' '<<max<<endl;
    }
}