#include <iostream>
#include <string>

class Book {
private:
    std::string title;
    int pages;
    std::string author;

public:
    Book() : title(""), pages(0), author("") {}

    Book(const std::string& title, int pages, const std::string& author)
        : title(title), pages(pages), author(author) {}

    Book(const Book& other)
        : title(other.title), pages(other.pages), author(other.author) {}

    Book(int pages) : title(""), pages(pages), author("") {}

    void setTitle(const std::string& title) {
        this->title = title;
    }

    void setPages(int pages) {
        this->pages = pages;
    }

    void setAuthor(const std::string& author) {
        this->author = author;
    }

    std::string getTitle() const {
        return title;
    }

    int getPages() const {
        return pages;
    }

    std::string getAuthor() const {
        return author;
    }

    void printInfo() const {
        std::cout << "Название: " << title << ", Страниц: " << pages << ", Автор: " << author << std::endl;
    }
};

int main() {
    Book book1;
    book1.printInfo();

    Book book2("Война и мир", 1225, "Лев Толстой");
    book2.printInfo();

    Book book3 = book2;
    book3.printInfo();

    Book book4 = 300;
    book4.printInfo();

    book4.setTitle("1984");
    book4.setAuthor("Джордж Оруэлл");
    book4.printInfo();

    return 0;
}
