#include <iostream>
#include <cstdio>
#include <limits>
#include <cmath>
using namespace std;
long long upper_limit = pow(10, 18);
int main()
{
int t;
unsigned int a;
long long b;
numeric_limits<long long>::max();
scanf("%d",&t);
for(int i=1; i<=t; i++)
{
scanf("%d %lld",&a,&b);
if(1<=a && b<=upper_limit)
printf("Case %d: %lld\n",i,a*b);
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0ZGlvPgojaW5jbHVkZSA8bGltaXRzPgojaW5jbHVkZSA8Y21hdGg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKbG9uZyBsb25nIHVwcGVyX2xpbWl0ID0gcG93KDEwLCAxOCk7CgppbnQgbWFpbigpCnsKICAgIGludCB0OwogICAgdW5zaWduZWQgaW50IGE7CiAgICBsb25nIGxvbmcgYjsKCiAgICBudW1lcmljX2xpbWl0czxsb25nIGxvbmc+OjptYXgoKTsKCiAgICBzY2FuZigiJWQiLCZ0KTsKCiAgICBmb3IoaW50IGk9MTsgaTw9dDsgaSsrKQogICAgewogICAgICAgIHNjYW5mKCIlZCAlbGxkIiwmYSwmYik7CiAgICAgICAgaWYoMTw9YSAmJiBiPD11cHBlcl9saW1pdCkKICAgICAgICAgICAgcHJpbnRmKCJDYXNlICVkOiAlbGxkXG4iLGksYSpiKTsKICAgIH0KCiAgICByZXR1cm4gMDsKfQ==