#include <iostream>
#include <math.h>
#include <bits/stdc++.h>
using namespace std ;
int main ()
{
int r ,t ,it ,i ;
double l ,w ,lt ,rt ,p ;
cin>>t ;
for (it=1 ;it<=t ; it++)
{
cin>>r ;
l=(r*5) ;
w=ceil((3*l)/5) ;
lt=ceil((9*l)/20) ;
rt=ceil((11*l)/20) ;
p= ceil (w/2.0) ;
cout<<"Case "<<it<<":"<<endl;
cout<<lt*-1<<" "<<p<<endl ;
cout<<rt<<" "<<p<<endl ;
cout<<rt<<" "<<p*-1<<endl ;
cout<<lt*-1<<" "<<p*-1<<endl ;
}
return 0 ;
}
#include <math.h>
#include <bits/stdc++.h>
using namespace std ;
int main ()
{
int r ,t ,it ,i ;
double l ,w ,lt ,rt ,p ;
cin>>t ;
for (it=1 ;it<=t ; it++)
{
cin>>r ;
l=(r*5) ;
w=ceil((3*l)/5) ;
lt=ceil((9*l)/20) ;
rt=ceil((11*l)/20) ;
p= ceil (w/2.0) ;
cout<<"Case "<<it<<":"<<endl;
cout<<lt*-1<<" "<<p<<endl ;
cout<<rt<<" "<<p<<endl ;
cout<<rt<<" "<<p*-1<<endl ;
cout<<lt*-1<<" "<<p*-1<<endl ;
}
return 0 ;
}