#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define forl(i,n) for(int i=0;i<n;i++)
ll max(ll a,ll b){
    if(a>=b) return a;
    else return b;
}
ll min(ll a, ll b){
    if(a>=b) return b;
    else return a;
}
int main(){
    int t;
    cin>>t;
    while(t--){
        ll n,i,x;
        cin>>n>>x;
        ll a[n];
        ll sum=0;
        forl(i,n){
            cin>>a[i];
            sum+=a[i];
        }
        sum=ceil((double)sum/x);
        ll sum1=0;
        forl(i,n){
            sum1+=ceil((double)a[i]/x);
        }
        cout<<sum<<" "<<sum1<<endl;
    }}