#include<iostream>
using namespace std;
class Rect{
private:
double l, w;
public:
Rect(double length = 0, double width = 0)
{
l = length;
w = width;
}
Rect(Rect &r);
const void show()
{
cout<<"the length and width of r1 is:"<<l<<','<<w<<endl;
cout<<"the perimeter of r1 is:"<<(l+w)*2<<endl;
cout<<"the area of r1 is:"<<(l*w)<<endl;
}
void show1()
{
cout<<"the length and width of r2 is:"<<l<<','<<w<<endl;
cout<<"the perimeter of r2 is:"<<(l+w)*2<<endl;
cout<<"the area of r2 is:"<<(l*w)<<endl;
}
};
Rect::Rect(Rect &r)
{
l = r.l;
w = r.w;
}
int main(){
double l, w;
cin>>l>>w;
if(l<0||w<0)
{
l = 0;
w = 0;
}
Rect r1(l,w);
Rect r2 = r1;
r1.show();
r2.show1();
return 0;
}
using namespace std;
class Rect{
private:
double l, w;
public:
Rect(double length = 0, double width = 0)
{
l = length;
w = width;
}
Rect(Rect &r);
const void show()
{
cout<<"the length and width of r1 is:"<<l<<','<<w<<endl;
cout<<"the perimeter of r1 is:"<<(l+w)*2<<endl;
cout<<"the area of r1 is:"<<(l*w)<<endl;
}
void show1()
{
cout<<"the length and width of r2 is:"<<l<<','<<w<<endl;
cout<<"the perimeter of r2 is:"<<(l+w)*2<<endl;
cout<<"the area of r2 is:"<<(l*w)<<endl;
}
};
Rect::Rect(Rect &r)
{
l = r.l;
w = r.w;
}
int main(){
double l, w;
cin>>l>>w;
if(l<0||w<0)
{
l = 0;
w = 0;
}
Rect r1(l,w);
Rect r2 = r1;
r1.show();
r2.show1();
return 0;
}