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

typedef long long int64;

template<class T,class T2,T mod>
struct modint{
  
  using mint=modint;
  using type=T;
  using type2=T2;
  
  static type umod(){return mod;}
  
  type v;
  
  modint():v(){}
  modint(const type &_v):v(_v){}
  
  template<class input_type>
  static mint standard(input_type v){return mint((v%mod+mod)%mod);}
  
  explicit operator bool ()const{return v;}
  bool operator ! ()const{return !v;}
  
  friend bool operator == (const mint &a,const mint &b){return a.v==b.v;}
  friend bool operator != (const mint &a,const mint &b){return a.v!=b.v;}
  
  type &data(){return v;}
  const type &data()const{return v;}
  
  mint &operator += (const mint &b){v=v>=mod-b.v?v-(mod-b.v):v+b.v;return *this;}
  mint &operator -= (const mint &b){v=v<b.v?v+(mod-b.v):v-b.v;return *this;}
  mint &operator *= (const mint &b){v=type2(v)*b.v%mod;return *this;}
  mint operator + ()const{return *this;}
  mint operator - ()const{return mint()-=*this;}
  mint &operator ++ (){v=v+1==mod?0:v+1;return *this;}
  mint &operator -- (){v=v?v-1:mod-1;return *this;}
  mint operator ++ (int){mint res=*this;v=v+1==mod?0:v+1;return res;}
  mint operator -- (int){mint res=*this;v=v?v-1:mod-1;return res;}
  friend mint operator + (const mint &a,const mint &b){return mint(a)+=b;}
  friend mint operator - (const mint &a,const mint &b){return mint(a)-=b;}
  friend mint operator * (const mint &a,const mint &b){return mint(a)*=b;}
  
  template<class input_type>
  mint pow(input_type k)const{
    mint a=*this,res=1;
    for (;k;k>>=1,a*=a)
      if (k&1) res*=a;
    return res;
  }
  
  mint inv()const{return pow(mod-2);}
  
  mint &operator /= (const mint &b){return *this*=b.inv();}
  friend mint operator / (const mint &a,const mint &b){return mint(a)/=b;}
  
};

typedef modint<int,int64,998244353> mint;

const int M=16,INF=(1<<30)-1;

int a,b,c;

void In(){
  scanf("%d%d%d",&a,&b,&c);
}

struct state{
  int x;
  mint c;
  state():x(),c(){}
  state(int _x,mint _c):x(_x),c(_c){}
};

state add1(const state &a){return state(a.x+1,a.c);}

state dp[2][(1<<M)+9],ans;
int o;

void Get_fg(){
  for (int s=0;s<1<<(a<<2)-1;++s) dp[o][s]=state(-INF,0);
  dp[o][0]=state(0,1);
  auto upd=[&](state &a,const state &b){
    if (b.x>a.x) a=b;
    else if (b.x==a.x) a.c+=b.c;
  };
  int all=(1<<(a<<2)-1)-1;
  // for (int s=0;s<1<<(a<<2)-1;++s)
    // cerr<<(bitset<7>)s<<" : "<<(bitset<4>)(s<<1&all)<<' '<<(bitset<4>)(s<<1&all|1)<<endl;
  for (int y=2*b-1;y>=1-2*b;--y)
    for (int x=2*a-1;x>=1-2*a;--x){
      o^=1;
      for (int s=0;s<1<<(a<<2)-1;++s) dp[o][s]=state(-INF,0);
      for (int s=0;s<1<<(a<<2)-1;++s){
        if (dp[o^1][s].x==-INF) continue;
        upd(dp[o][s<<1&all],dp[o^1][s]);
        if ((x+y>=1-2*c&&x+y<=2*c-1)&&
            (y+1>2*b-1||s>>(a<<2)-2&1^1)&&
            (y+1>2*b-1||x-1<1-2*a||s>>(a<<2)-3&1^1)&&
            (x+1>2*a-1||s&1^1))
          upd(dp[o][s<<1&all|1],add1(dp[o^1][s]));
      }
      // cerr<<x<<' '<<y<<" : "<<endl;
      // for (int s=0;s<1<<(a<<2)-1;++s)
        // cerr<<(bitset<7>)s<<" : "<<dp[o][s].x<<' '<<dp[o][s].c.data()<<endl;
    }
  ans=state(0,0);
  for (int s=0;s<1<<(a<<2)-1;++s) upd(ans,dp[o][s]);
}

void Out(){
  printf("%d %d\n",ans.x,ans.c.data());
}

void work(){
  In();
  Get_fg();
  Out();
}

int main(){
  freopen("geometry.in","r",stdin);
  freopen("geometry.out","w",stdout);
  int T=1;
  scanf("%d",&T);
  for (;T--;) work();
  return 0;
}
