#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  
  int t, n, x, a;

  cin >> t;

  while (t--) {
   ll sum = 0, mx = 0;

    
    cin >> n >> x;
    
    while (n--) {
      cin >> a;

      mx += (ll) ceil((double) a / x);
      sum += a;
    }

    cout << (ll) ceil((double) sum / x) << " " << mx << "\n";
  }
}
