#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
int64_t lol;

signed main()
{
    ios_base::sync_with_stdio(!cin.tie(nullptr));
    int64_t testc = 1;
    cin >> testc;
    while (testc--)
    {
        int n, x;
        cin >> n >> x;
        int maxx = 0, mini = 0, temp = 0;
        for (int i = 0; i < n; i++)
        {
            cin >> lol;
            maxx += (lol + x - 1) / x;
            if (lol % x)
            {
                temp += lol;
            }
            else
            {
                mini += lol / x;
            }
        }
        mini += (temp + x - 1) / x;
        cout << mini << " " << maxx;

        cout << endl;
    }
    return 0;
}