#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pb push_back
#define mk make_pair
#define v_sort(x) sort(x.begin(),x.end())
#define v_gsort(x) sort(x.begin(),x.end(),greater<int>())
#define v_find(x,num) find(x.begin(),x.end(),num)
#define PI 3.14159265
#define MOD 998244353
#define MOD1 1000000007

using namespace std;

void Solve(){
  ll n,x;
  cin>>n>>x;
  vector<ll>a(n);
  for(int i=0;i<n;i++) cin>>a[i];
  ll mn=0,mx=0,sum=0;
  for(int i=0;i<n;i++){
    mn+=(a[i]+x-1)/x;
    sum+=a[i];
  }
  mx=mn;
  mn=(sum+x-1)/x;
  cout<<mn<<" "<<mx<<'\n';
}

int main(){
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int t=1;
  cin>>t;
  while(t--){
    Solve();
  }
  return 0;
}
