#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mset(arr,x) memset(arr,x,sizeof(arr))
#define rep(i,s,e) for(i=s;i<=e;i++)
#define rrep(i,s,e) for(i=s;i>=e;i--)
ll dp[4010][4010];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
ll N, i, j, T, M, ppll;
string st;
cin >> T;
rep(ppll, 1, T)
{
mset(dp, 0);
cin >> N >> M;
rep(i, 1, N)
{
dp[i][0] = 1;
}
rep(i, 1, N)
{
rep(j, 1, i-1)
{
if( i!=j )
{
dp[i][j] = dp[i-1][j] + dp[i][j-1];
}
}
}
double anss = (double)dp[N][M];
ll val = N+M;
rrep(i, M, 1)
{
double opop = (double)( ((double)i)/val );
anss = ( anss * opop );
val--;
}
cout << "Case #" << ppll << ": " << setprecision(12) << anss << endl;
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgojZGVmaW5lIGxsIGxvbmcgbG9uZwojZGVmaW5lIG1zZXQoYXJyLHgpIG1lbXNldChhcnIseCxzaXplb2YoYXJyKSkKI2RlZmluZSByZXAoaSxzLGUpIGZvcihpPXM7aTw9ZTtpKyspCiNkZWZpbmUgcnJlcChpLHMsZSkgZm9yKGk9cztpPj1lO2ktLSkKCmxsIGRwWzQwMTBdWzQwMTBdOwppbnQgbWFpbigpCnsKICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOwogICAgY2luLnRpZSgwKTsKCiAgICBsbCBOLCBpLCBqLCBULCBNLCBwcGxsOwogICAgc3RyaW5nIHN0OwoKICAgIGNpbiA+PiBUOwogICAgcmVwKHBwbGwsIDEsIFQpCiAgICB7CiAgICAgICBtc2V0KGRwLCAwKTsKCiAgICAgICBjaW4gPj4gTiA+PiBNOwogICAgICAgcmVwKGksIDEsIE4pCiAgICAgICB7CiAgICAgICAgICAgZHBbaV1bMF0gPSAxOwogICAgICAgfQoKICAgICAgIHJlcChpLCAxLCBOKQogICAgICAgewogICAgICAgICAgIHJlcChqLCAxLCBpLTEpCiAgICAgICAgICAgewogICAgICAgICAgICAgICBpZiggaSE9aiApCiAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgIGRwW2ldW2pdID0gZHBbaS0xXVtqXSArIGRwW2ldW2otMV07CiAgICAgICAgICAgICAgIH0KICAgICAgICAgICB9CiAgICAgICB9CgogICAgICAgZG91YmxlIGFuc3MgPSAoZG91YmxlKWRwW05dW01dOwogICAgICAgbGwgdmFsID0gTitNOwoKICAgICAgIHJyZXAoaSwgTSwgMSkKICAgICAgIHsKICAgICAgICAgICBkb3VibGUgb3BvcCA9IChkb3VibGUpKCAoKGRvdWJsZSlpKS92YWwgKTsKICAgICAgICAgICBhbnNzID0gKCBhbnNzICogb3BvcCApOwogICAgICAgICAgIHZhbC0tOwogICAgICAgfQoKICAgICAgIGNvdXQgPDwgIkNhc2UgIyIgPDwgcHBsbCA8PCAiOiAiIDw8IHNldHByZWNpc2lvbigxMikgPDwgYW5zcyA8PCBlbmRsOwogICAgfQoKICAgIHJldHVybiAwOwp9Cg==