/**/
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cctype>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <stack>
#include <queue>
typedef long long LL;
using namespace std;
int n, m;
int main()
{
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
int cas = 0;
int t;
scanf("%d", &t);
while(t--){
scanf("%d %d", &n, &m);
printf("Scenario #%d:\n", ++cas);
if(n % 2 == 0 || m % 2 ==0){
printf("%.2lf\n", (double)n * m);
}else{
printf("%.2lf\n", n * m - 1 + sqrt((double)2));
}
printf("\n");
}
return 0;
}
/**/