#include <bits/stdc++.h>
#define boost                     \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                   \
    cout.tie(0)
#define int long long
#define x first
#define y second
using namespace std;

const int N(1e6 + 13);
int n, q, a, b, c, x, sum, t[N], summin, tmp;

int32_t main() {
    boost;
    cin >> q;
    while (q--) {
        sum = 0;
        summin = 0;
        cin >> n >> x;
        for(int i = 1; i <= n; i++){
            cin >> t[i];
            sum += t[i];
            tmp = (t[i] + x - 1) / x;
            summin += tmp;
            
        }
        cout << (sum + x - 1)/ x << " " << summin << endl;
    }
}