#include<bits/stdc++.h>
using namespace std;
int main(){
    int t;
    cin >> t;
    while(t--){
        long long int n, x;
        cin >> n >> x;
        long long int nums[n], max = 0, sum = 0;
        for(int i= 0; i<n ; i++){
            cin >> nums[i];
            max += (nums[i] + x - 1)/x;
            sum += nums[i];
        }
        long long int min = (sum + x  - 1)/ x;
        cout << min << " " << max << "\n"; 
    }
}