// Fresh Peach Heart Shower
#include <bits/stdc++.h>
#define int long long
#define pb push_back
#define mem(x,y) memset(x,y,sizeof(x))
#define MP std::make_pair
#define ALL(x) (x).begin(),(x).end()
#define ln std::putchar('\n')
#define lsp std::putchar(' ')
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,b,a) for(int i=(b);i>=(a);--i)
#define dprintf(x...) fprintf(stderr,x)
typedef std::pair<int,int> pii;
typedef std::vector<int> poly;
template <class t> inline void read(t &s)
{
	s=0;
	char c=getchar();
	signed f=0;
	while(!isdigit(c))f|=c=='-',c=getchar();
	while(isdigit(c))s=(s<<3)+(s<<1)+(c^48),c=getchar();
	if(f)s=-s;
}
template <class t> inline void write(t x)
{
	if(!x)return std::putchar('0'),void();
	if(x<0)std::putchar('-'),x=-x;
	static signed st[50],tp=0;
	while(x)st[++tp]=x%10,x/=10;
	while(tp)std::putchar(st[tp--]^48);
}
inline void setIn(std::string s){freopen(s.c_str(),"r",stdin);}
inline void setOut(std::string s){freopen(s.c_str(),"w",stdout);}
inline void setIO(std::string s){setIn(s+".in"),setOut(s+".out");}
template <class t> inline bool ckmin(t&x,t y){if(x>y)return x=y,1;return 0;}
template <class t> inline bool ckmax(t&x,t y){if(x<y)return x=y,1;return 0;}
inline int lowbit(int x){return x&(-x);}
#define fi first
#define se second
typedef long long ll;
const int MaxN=1e6+50;
const ll p=998244353;
const int dir[6][2]={1,0,0,1,-1,0,0,-1,+1,-1,-1,+1};
std::map<pii ,int> id;int idx;
poly E[MaxN];
int used[MaxN],ans;
ll sum;
inline void dfs(int dep,int co)
{
	if(dep>idx)
	{
		if(ckmax(ans,co))sum=1;
		else if(ans==co)++sum;
/*		if(ans==7)
		{
			rep(i,1,idx)if(!used[i])
			{
				for(auto j:id)if(j.se==i)
				{
					dprintf("<><  %lld %lld\n",j.fi.fi,j.fi.se);
				}

			}
			exit(0);
		}*/
		return;
	}
	if(used[dep])return dfs(dep+1,co);
	dfs(dep+1,co);
	for(auto v:E[dep])++used[v];
	dfs(dep+1,co+1);
	for(auto v:E[dep])--used[v];
}
inline void work()
{
	id.clear(),idx=0;
	int A,B,C;read(A),read(B),read(C);
	ans=-1;
	rep(x,-2*A+1,2*A-1)rep(y,-2*B+1,2*B-1)if((x&1)||(y&1))
		if(std::abs(x+y)<=2*C-1)
//			dprintf(">> %d %d\n",x,y),
			id[MP(x,y)]=++idx;
	rep(i,1,idx)E[i].clear();
	for(auto i:id)
	{
		int x=i.fi.fi,y=i.fi.se;
		rep(k,0,5)
		{
			int nx=dir[k][0]+x,ny=dir[k][1]+y;
			if(id.find(MP(nx,ny))==id.end())continue;
			E[i.se].pb(id[MP(nx,ny)]);
		}
	}
//	dprintf("ID %d\n",idx);
	dfs(1,0);
	write(ans),lsp,write(sum),ln;
}
signed main(void)
{
	setIO("geometry");

	int t;read(t);
	while(t--)work();
	return 0;
}





