//05.1.2021
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

bool my_comp(pair<int,int> a, pair<int,int> b){
    if(a.second < b.second || (a.second == b.second && a.first <= b.first))
        return true;
    return false;
}

void solve(){
    int n, x, temp;
    cin>>n>>x;
    long long ans1=0, ans2 = 0;
    for(int i=0; i<n; i++){
        cin>>temp;
        ans2 += (temp / x);
        if(temp % x != 0)
            ans2++;
        ans1 += temp;
    }
    int def = 0;
    if(ans1 % x != 0)
        def = 1;
    cout<<ans1 / x + def<<" "<<ans2<<endl;
}

int main(){
    int t;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}

/*



 */