#include <iostream>
using namespace std;

class shape
{
    int x,y;
};

class Rectangle:public shape
{
    int length,width;
    public:
    Rectangle(int l, int w);
    void GetArea();
};

class Circle:public shape
{
    int radius;
    public:
    Circle(int r);
    void GetArea();
};

class Square:public Rectangle
{
    public:
    Square(int a);
};

Rectangle::Rectangle(int l,int w):length(l),width(w){}
void Rectangle::GetArea()
{
    cout<<length*width<<endl;
}

Circle::Circle(int r)
{
    radius=r;   
}
void Circle::GetArea()
{
    cout<<radius*radius*3.14<<endl;
}
Square::Square(int a):Rectangle(a,a){}

int main()
{
    int l,w,r,a;
    cin>>l>>w>>r>>a;
    Rectangle chang(l,w);
    Circle yuan(r);
    Square fang(a);
    chang.GetArea();
    yuan.GetArea();
    fang.GetArea();
    return 0;
}