#include <bits/stdc++.h>
using namespace std;

bool check(int x0, int y0, int x, int y) {
	if (x0 == x && y0 == y - 1) return 1;
	if (x0 == x && y0 == y + 1) return 1;
	if (x0 == x - 1 && y0 == y) return 1;
	if (x0 == x - 1 && y0 == y + 1) return 1;
	if (x0 == x + 1 && y0 == y) return 1;
	if (x0 == x + 1 && y0 == y - 1) return 1;
	return 0;
}
int main() {
	freopen("geometry.in", "r", stdin);
	freopen("geometry.out", "w", stdout);
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int T;
	cin >> T;
	while (T--) {
		int a, b, c;
		cin >> a >> b >> c;
		vector<pair<int, int>> point;
		for (int x = -2 * a + 1; x <= 2 * a - 1; x++) {
			for (int y = -2 * b + 1; y <= 2 * b - 1; y++) {
				if (x % 2 == 0 && y % 2 == 0) continue;
				if (-2 * c + 1 <= x + y && x + y <= 2 * c - 1) {
					point.emplace_back(x, y);
				}
			}
		}
		int n = (int) point.size();
		vector<int> ban(n);
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < n; j++) {
				if (i == j) continue;
				if (check(point[i].first, point[i].second, point[j].first, point[j].second)) {
					ban[i] |= 1 << j;
				}
			}
		}
		int mx = 0, cnt = 0;
		for (int s = 0; s < 1 << n; s++) {
			bool can = true;
			int c = 0;
			for (int i = 0; i < n; i++) {
				if (s >> i & 1) {
					c++;
					if (s & ban[i]) {
						can = false;
						break;
					}
				}
			}
			if (can == false) {
				continue;
			}
			if (c > mx) {
				mx = c;
				cnt = 1;
			} else if (c == mx) {
				cnt++;
			}
		}
		cout << mx << " " << cnt << "\n";
	}
	return 0;
}