#include <iostream>
#include <cmath>
using namespace std;
int main(){
int a,b,c,d,e,f,g,h,i,j;
cin>>a>>b>>c>>d>>e>>f>>g>>h>>i>>j;
cout<<a*a<<" "<<a*4<<endl;
cout<<b*b<<" "<<b*4<<endl;
cout<<c*c<<" "<<c*4<<endl;
cout<<d*d<<" "<<d*4<<endl;
cout<<e*e<<" "<<e*4<<endl;
cout<<f*f<<" "<<f*4<<endl;
cout<<g*g<<" "<<g*4<<endl;
cout<<h*h<<" "<<h*4<<endl;
cout<<i*i<<" "<<i*4<<endl;
cout<<j*j<<" "<<j*4<<endl;
}