#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define ld long double
#define mp make_pair
#define ph push
#define pb push_back
#define pp pop_back()
#define np next_permutation
#define mpl map<ll,ll>
#define fin(i,a,b) for(int i=a;i<=b;i++)
#define finr(i,a,b) for(int i=a;i>=b;--i)
#define max3(a,b,c) max(max(a,b),c)
#define min3(a,b,c) min(min(a,b),c)
#define all(v) v.begin(),v.end()
#define allr(v) v.rbegin(),v.rend()
#define ff first
#define ss second
#define debug(x) cerr << #x << " = " << x << endl;
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define minihp priority_queue <int, vector<int>, greater<int>>
#define mem0(a) memset(a,0,sizeof(a))
#define CT1 cout<<"YES"<<endl;
#define CT0 cout<<"NO"<<endl;

typedef  vector<long long> vll;
typedef  vector<vector<int>> vv;
typedef  vector<pair<ll, ll>> vp;
typedef  vector<int> vi;

const ld EPS = 1e-9;
const ld PI = acos(-1);
const ll INF = 1e18;
const ll mod = 1e9 + 7 ;

/*template<typename... T>
void read(T&...args) {
	((std::cin >> args), ...);
}
template<typename...T>
void write(T&...args) {
	((std::cout << args << " "), ...);
}*/
//set<int> l,r;
/*ll nodes, edges;
vector<int> adj[100005];
bool vis[100005];
vi ans(100005);
ll sum[100005];
void dfs(int k, bool c) {
	if (vis[k])return;
	if (c)ans[k] = 1;
	else ans[k] = 2;
	vis[k] = true;
	sum[k]+=((ans[i]==1)?2:1);
	for (auto u : adj[k]) {
		sum[u]+=ans[k];
		dfs(u, !c);
	}
}*/
//1 1 1 x = 3
void solve() {
	ll n, x;
	cin >> n >> x;
	ll mx = 0;
	ll a[n + 1], pref[n + 2], suff[n + 2];
	pref[0] = 0, suff[n + 1] = 0, pref[n + 1] = 0;
	fin(i, 1, n) {
		//ll a;
		cin >> a[i];
		pref[i] = pref[i - 1] + a[i];
		ll z = a[i] / x;
		if (z * x < a[i])++z;
		mx += z;
		//cout << z << " ";

	}
	finr(i, n, 1) {
		suff[i] = suff[i + 1] + a[i];
	}
	ll mn = INF;
	fin(i, 0, n ) {
		mn = min(mn, pref[i] / x + ((pref[i] % x == 0) ? 0 : 1) + suff[i + 1] / x + ((suff[i + 1] % x == 0) ? 0 : 1));
		//mx = max(mx, ceil((double(pref[i]) / x)) + ceil(double(suff[i + 1]) / x));
	}
	cout << mn << " " << mx << endl;
}
int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int t;
	cin >> t;
	while (t--) {
		solve();
	}
	//solve();
	/*int n, m;
	cin >> n >> m;
	//vector<int> adj[n + 1];
	while (m--) {
		int a, b;
		cin >> a >> b;
		adj[a].pb(b);
		adj[b].pb(a);
	}
	//memset(ans, false, sizeof(ans));
	mem0(sum);
	memset(vis, false, sizeof(vis));
	fin(i, 1, n) {
		if (vis[i])continue;
		else {
			nodes = 0, edges = 0;
			dfs(i, true);

		}
	}
	fin(i, 1, n) {
		cout << ans[i] << " ";
	}*/

	cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
	return 0;
}