#includeusing namespace std;typedef long long LL;const int N=1e2+10;int main(){ int T,cas=1,n,x; scanf("%d",&T); while(T--) { scanf("%d",&n); int up=0; int down=n; for(int i=1;i<=n;i++) { scanf("%d",&x); up+=abs(x); if(x<0) down--; } if(!down) printf("Case %d: inf\n",cas++); else { int g=__gcd(up,down); printf("Case %d: %d/%d\n",cas++,up/g,down/g); } } return 0;}