#include<bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define ll long long
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define rep(i,a,b) for(int i=a; i<b; i++)
const int INF = 1e9 + 7;
 
int main(){
      IOS;
      int t;
      cin>>t;
      while(t--) {
      	int n;
      	cin>>n;
      	ll x, sum = 0, maxb = 0;
      	cin>>x;
      	vector<int> a(n);
      	rep(i, 0, n) {
      		cin>>a[i];
      		sum += a[i];
      		maxb += ceil((double)a[i]/(double)x);
      	}
      	cout<<(ll)ceil((double)sum/(double)x)<<" "<<maxb<<endl;
      }
      return 0;
}