#include<bits/stdc++.h>
using namespace std;
//#define int long long
typedef long long int ll;
#define  pb push_back
int main()
{
   ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  int t;
  cin>>t;
  while(t--)
  {
    ll n,x;
    cin>>n>>x;
    ll a[n],sum=0,sum1=0,sum2=0;
    for(int i=0;i<n;i++)
    {
      cin>>a[i];
      sum+=a[i];
      sum1+=ceil((a[i]*1.0)/x);
    }

    sum2=ceil(sum/(x*1.0));
    //cout<<sum2<<"\n";
    cout<<min(sum2,sum1)<<" "<<max(sum2,sum1)<<"\n";
  }
   
}   