// a=b=c

#include <bits/stdc++.h>
typedef unsigned uint;
typedef unsigned long long ullt;typedef long long llt;
typedef bool bol;typedef char chr;typedef void voi;
const ullt Mod=998244353;
struct modint
{
	ullt v;
	modint():v(){}
	modint(ullt v):v(v%Mod){}
	friend modint operator+(modint a,modint b){return a()+b();}
	friend modint operator-(modint a,modint b){return a()+Mod-b();}
	friend modint operator*(modint a,modint b){return a()*b();}
	friend modint Pow(modint base,uint index)
	{
		modint ans(1);
		while(index)
		{
			if(index&1)ans*=base;
			base*=base,index>>=1;
		}
		return ans;
	}
	voi read(){scanf("%llu",&v),v%=Mod;}
	voi println(){printf("%llu\n",v);}
	inline ullt&operator()(){return v;}
	modint&operator+=(modint v){return*this=*this+v;}
	modint&operator-=(modint v){return*this=*this-v;}
	modint&operator*=(modint v){return*this=*this*v;}
};
int main()
{
	freopen("geometry.in","r",stdin);
	freopen("geometry.out","w",stdout);
	uint t;
	scanf("%u",&t);
	while(t--)
	{
		uint a,b,c;
		scanf("%u%u%u",&a,&b,&c);
		printf("%llu ",3llu*a*a);
		Pow((modint)2,a).println();
	}
	return 0;
}

