#include <iostream>

class Rectangle {
private:
    int length;
    int width;

public:

    Rectangle() : length(1), width(1) {
        std::cout << "Rectangle object with default values created." << std::endl;
    }

    Rectangle(int l, int w) : length(l), width(w) {
        std::cout << "Rectangle object with given values created." << std::endl;
    }


    ~Rectangle() {
        std::cout << "Rectangle object destroyed." << std::endl;
    }


    int getArea() const {
        return length * width;
    }

    void displayDetails() const {
        std::cout << "Length: " << length << ", Width: " << width << ", Area: " << getArea() << std::endl;
    }
};

int main() {
    Rectangle rect1;
    std::cout << "Details of rect1:" << std::endl;
    rect1.displayDetails();


    Rectangle rect2(5, 3);
    std::cout << "Details of rect2:" << std::endl;
    rect2.displayDetails();

    return 0;
}
