#include <bits/stdc++.h>
using namespace std;
#define ll long long
void solve(){
   int n,x,temp(0);
    cin>>n>>x;
    ll mini=0,maxi=0;
    for(int i=0;i<n;i++){
        int z;
        cin>>z;
        maxi+=ceil((double)z/x);
        mini+=z;
    }
    mini=ceil((double)mini/x);
    cout<<mini<<" "<<maxi<<endl;
    
    
    
    
    
    
    
        
}
int main() {
	int t;
	cin>>t;
// t=1;
	while(t--)
	solve();
}