/*
Author: arbissa
Date: 05.01.2021
Time: 20:30:36
*/
#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define endl '\n'
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define pf pop_front
#define yes cout << "YES" << '\n';
#define no cout << "NO" << '\n';
#define watch(x) cout << (#x) << " is " << (x) << endl;
using namespace std;

int const INF = 1e5 + 5;

bool comp(pair<int,int> a, pair<int,int> b) {
    if(a.ff < b.ff) return true;
    if(a.ff == b.ff and a.ss < b.ss) return true;
    return false;
}

void solve() {
    ll n, x;
    cin >> n >> x;
    vector<ll> a(n);
    ll mx = 0, mn = 0;
    for(ll i = 0; i < n; i++){
        cin >> a[i];
        mx += (a[i] + x-1)/x;
        mn += a[i];
    }
    mn = (mn+x-1)/x;
    cout << mn << ' ' << mx << endl; 

}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    // freopen("input.in", "r", stdin);
    // freopen("output.out", "w", stdout);
    int t = 1;
    cin >> t;
    while(t--)
        solve();
    return 0;
}