#include <iostream>
#include <fstream>
#include <cstdio>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>
#include <set>
#include <queue>
#include <deque>
#include <ctime>
#include <cstdlib>

using namespace std;

#define sz(x) ((int)((x).size()))

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;

const double EPS = 1e-9;
const double PI = acos(-1.0);

const int INF = (int)(1e9);

void update(int &x, int y) {
	x = min(x, y);
}

int n, t, b[50];
int dp[2][3650];

void solve() {
	scanf("%d%d", &n, &t);
	for (int i = 0; i < n; i++) {
		scanf("%d", &b[i]);
	}
	sort(b, b + n);
	for (int i = 0; i < 2; i++) {
		for (int j = 0; j < 3650; j++) {
			dp[i][j] = INF;
		}
	}
	dp[0][0] = dp[1][0] = 0;
	for (int i = 0; i < n; i++) {
		if (b[i] < 0) {
			b[i] = abs(b[i]);
			for (int j = 0; j < 3600 - b[i] + 1; j++) {
				if (dp[0][j] != -1) {
					update(dp[0][j + b[i]], dp[0][j] + 1);
				}
			}
		} else if (b[i] > 0) {
			for (int j = 0; j <= 3600; j++) {
				if (dp[1][j] != -1) {
					update(dp[1][min(j + b[i], 3600)], dp[1][j] + 1);
				}
			}
		}
	}
	int ans = INF;
	int delta = INF;
	for (int i = t; i <= 3600; i++) {
		if (dp[1][i] != INF) {
			for (int j = 0; j < i - t + 1; j++) {
				if (dp[0][j] != INF) {
					if (delta > i - j - t || (delta == i - j - t && ans > dp[1][i] + dp[0][j])) {
						ans = dp[1][i] + dp[0][j];
						delta = i - j - t;
					}
				}
			}
		}
	}
	printf("%d %d\n", ans, delta);
}

int main() {
	//freopen(".in", "r", stdin);
	//freopen(".out", "w", stdout);

	int T;
	scanf("%d", &T);
	while (T-- > 0) {
		solve();
	}

	return 0;
}
