#include<bits/stdc++.h>
using namespace std;
 
#define rapid() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl '\n'
#define pb push_back
#define mp make_pair
 
int main()
{
  rapid();
  // freopen("input.txt","r",stdin);
  // freopen("output.txt","w",stdout);
  int t;
  cin>>t;
  while(t--){
       long long n,x,sum1=0,sum=0;
       cin>>n>>x;
       for(int i=0;i<n;i++){
       	long long a;
       	cin>>a;
       	if(a%x!=0)
       		sum+=(a/x)+1;
       	else if(a%x==0) 
       		sum+=a/x;
       	sum1+=a;
       }
       if(sum1%x!=0){
       	cout<<(sum1/x)+1<<" "<<sum<<endl;
       }
       else{
       	cout<<sum1/x<<" "<<sum<<endl;
       }
  }
  return 0;
}