#include <iostream>
using namespace std;

int main(){
    int t;
    cin >> t;
    while(t--){
        long long int n,x;
        cin >> n >> x;
        long long int arr[n],min=0,max=0;
        for(int i=0;i<n;i++){
            cin >> arr[i];
            min+=arr[i];
            max+=arr[i]/x;
            if(arr[i]%x!=0)
                max++;
        }
        if(min%x==0)
            min/=x;
        else
        {
            min/=x;
            ++min;
        }
        
        cout << min << " " << max <<endl;
    } 

    return 0;
}