#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define clr(s) memset(s,0,sizeof(s)) #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 const double PI = acos(-1); const ll mod = 1e9+7; int t,n; double ansa,ansb; int main() { cin>>t; int cas=1; while(t--){ cin>>n; ansa=1.0+((double)n-2.0)*19.0/27.0; ansb=(46.0-38.0/(double)n)/(19.0-11.0/(double)n); printf("Case #%d:\n%.6f %.6f\n",cas++,ansa,ansb); } return 0; }