#ifdef LOCAL
#include "algo/dbg.hpp"
#else
#include "bits/stdc++.h"
#define dbg(...)
#endif
using namespace std;
#define endl '\n'
// #define int long long
#define sz(x) (int) x.size()
#define pb push_back
#define all(v) v.begin(), v.end()
#define rep(i,a,b) for (int i = (a); i < (b); ++i)
#define rrep(i,a,b) for (int i = (a); i >= (b); --i)
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
template<class T> bool ckmin(T& a, T b){ return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, T b){ return b > a ? a = b, 1 : 0; }
template<class T> istream& operator>>(istream&i,vector<T>&v){for(T&x:v)i>>x;return i;}\
typedef complex<double> C;
typedef vector<double> vd;
void fft(vector<C>& a) {
int n = sz(a), L = 31 - __builtin_clz(n);
static vector<complex<long double>> R(2, 1);
static vector<C> rt(2, 1); // (^ 10% faster if double)
for (static int k = 2; k < n; k *= 2) {
R.resize(n); rt.resize(n);
auto x = polar(1.0L, acos(-1.0L) / k);
rep(i,k,2*k) rt[i] = R[i] = i&1 ? R[i/2] * x : R[i/2];
}
vi rev(n);
rep(i,0,n) rev[i] = (rev[i / 2] | (i & 1) << L) / 2;
rep(i,0,n) if (i < rev[i]) swap(a[i], a[rev[i]]);
for (int k = 1; k < n; k *= 2)
for (int i = 0; i < n; i += 2 * k) rep(j,0,k) {
// C z = rt[j+k] * a[i+j+k]; // (25% faster if hand-rolled) /// include-line
auto x = (double *)&rt[j+k], y = (double *)&a[i+j+k]; /// exclude-line
C z(x[0]*y[0] - x[1]*y[1], x[0]*y[1] + x[1]*y[0]); /// exclude-line
a[i + j + k] = a[i + j] - z;
a[i + j] += z;
}
}
vd conv(const vd& a, const vd& b) {
if (a.empty() || b.empty()) return {};
vd res(sz(a) + sz(b) - 1);
int L = 32 - __builtin_clz(sz(res)), n = 1 << L;
vector<C> in(n), out(n);
copy(all(a), begin(in));
rep(i,0,sz(b)) in[i].imag(b[i]);
fft(in);
for (C& x : in) x *= x;
rep(i,0,n) out[i] = in[-i & (n - 1)] - conj(in[i]);
fft(out);
rep(i,0,sz(res)) res[i] = imag(out[i]) / (4 * n);
return res;
}
typedef vector<ll> vl;
template<int M> vl convMod(const vl &a, const vl &b) {
if (a.empty() || b.empty()) return {};
vl res(sz(a) + sz(b) - 1);
int B=32-__builtin_clz(sz(res)), n=1<<B, cut=int(sqrt(M));
vector<C> L(n), R(n), outs(n), outl(n);
rep(i,0,sz(a)) L[i] = C((int)a[i] / cut, (int)a[i] % cut);
rep(i,0,sz(b)) R[i] = C((int)b[i] / cut, (int)b[i] % cut);
fft(L), fft(R);
rep(i,0,n) {
int j = -i & (n - 1);
outl[j] = (L[i] + conj(L[j])) * R[i] / (2.0 * n);
outs[j] = (L[i] - conj(L[j])) * R[i] / (2.0 * n) / C(0, 1); // / 1i
}
fft(outl), fft(outs);
rep(i,0,sz(res)) {
ll av = ll(real(outl[i])+.5), cv = ll(imag(outs[i])+.5);
ll bv = ll(imag(outl[i])+.5) + ll(real(outs[i])+.5);
res[i] = ((av % M * cut + bv) % M * cut + cv) % M;
}
return res;
}
template<int MOD, int RT> struct Mint {
static const int mod = MOD;
static constexpr Mint rt() { return RT; } // primitive root for FFT
int v; explicit operator int() const { return v; } // explicit -> don't silently convert to int
Mint():v(0) {}
Mint(ll _v) { v = int((-MOD < _v && _v < MOD) ? _v : _v % MOD); if (v < 0) v += MOD; }
bool operator==(const Mint& o) const { return v == o.v; }
friend bool operator!=(const Mint& a, const Mint& b) { return !(a == b); }
friend bool operator<(const Mint& a, const Mint& b) { return a.v < b.v; }
Mint& operator+=(const Mint& o) { if ((v += o.v) >= MOD) v -= MOD; return *this; }
Mint& operator-=(const Mint& o) { if ((v -= o.v) < 0) v += MOD; return *this; }
Mint& operator*=(const Mint& o) { v = int((ll)v*o.v%MOD); return *this; }
Mint& operator/=(const Mint& o) { return (*this) *= inv(o); }
friend Mint pow(Mint a, ll p) {
Mint ans = 1; assert(p >= 0);
for (; p; p /= 2, a *= a) if (p&1) ans *= a; return ans; }
friend Mint inv(const Mint& a) { assert(a.v != 0); return pow(a,MOD-2); }
Mint operator-() const { return Mint(-v); }
Mint& operator++() { return *this += 1; }
Mint& operator--() { return *this -= 1; }
friend Mint operator+(Mint a, const Mint& b) { return a += b; }
friend Mint operator-(Mint a, const Mint& b) { return a -= b; }
friend Mint operator*(Mint a, const Mint& b) { return a *= b; }
friend Mint operator/(Mint a, const Mint& b) { return a /= b; }
friend ostream& operator<<(ostream &out, const Mint &m) {return out << m.v;}
friend istream& operator>>(istream &in, Mint &m) {long long x; in >> x; m = Mint(x); return in;}
};
const int MOD = 7340033; // change accordingly
using mint = Mint<MOD,5>;
vector<mint> fact(1, 1);
vector<mint> inv_fact(1, 1);
mint choose(int n, int k) {
if (k < 0 || k > n) {
return 0;
}
while ((int) fact.size() < n + 1) {
fact.push_back(fact.back() * (int) fact.size());
inv_fact.push_back(1 / fact.back());
}
return fact[n] * inv_fact[k] * inv_fact[n - k];
}
void solve(int tc = 0) {
int n; cin >> n;
vi cnt(4, 0);
rep(i, 0, n){
int x, y; cin >> x >> y;
if(x > 0 and y > 0) cnt[0]++;
if(x > 0 and y < 0) cnt[3]++;
if(x < 0 and y > 0) cnt[1]++;
if(x < 0 and y < 0) cnt[2]++;
}
int a = min(cnt[0], cnt[2]);
int b = min(cnt[1], cnt[3]);
vl polya(a+1);
vl polyb(b+1);
for(int i = 0; i <= a; i++){
polya[i] = 1LL*int(choose(cnt[0], i))*1LL*int(choose(cnt[2], i));
}
for(int i = 0; i <= b; i++){
polyb[i] = 1LL*int(choose(cnt[1], i))*1LL*int(choose(cnt[3], i));
}
auto it = convMod<7340033>(polya, polyb);
dbg(it.size());
cout << "Case " << tc+1 << ": \n";
while(it.size() <= n) it.pb(0);
for(int i = 1; i <= n; i++){
if(i&1){
cout << 0;
}else{
cout << it[i/2];
}
cout << " \n"[i == n];
}
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
int tc = 1;
cin >> tc;
for(int t = 0; t < tc; t++) solve(t);
}