#include <iostream>
#include <string.h>
#include <stdio.h>
#include <math.h>
#define lld long long
using namespace std;
int main()
{
int t;
double PI;
double l,r,A,C,w;
cin>>t;
PI= acos(- 1);
while(t--)
{
cin>>l;
r=l/5;
w= (6*l)/10;
A = w*l;
C= PI*r*r;
A -=C;
printf("%.2lf %.2lf\n",C,A);
}
return 0;
}