#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin >> t; 
    while (t--)
    {
        int n,x;
        cin >>n >> x;
        int a[n];
        long long mx=0, mn=0;
        long long sum=0;
        for (int i=0; i<n; i++)
        {
            cin >> a[i];
            int th= a[i]/x;
            if (th*x==a[i]) mx+=th;
            else mx += th +1;
            sum +=a [i];
        }
        mn = sum/x;
        if (mn * x != sum) mn++;
        cout << mn << " " << mx << "\n";
    }
    return 0;
}