#include<iostream>
using namespace std;

class Employee {
    public:
    string name;
    float salary;
};
int main() {
    Employee emp;
    Manager mgr;
    
    cin >> emp.name >> emp.salary >> mgr.name << mgr.salary >>  mgr.department;
    
    if (emp.salary < 0 || mgr.salary < 0) {
        cout << "Invalid input";
        return 0;
    }
    cout << "Employee Details:" << endl;
    cout << "Name: " << emp.nmae << endl;
    cout << "Salary: " << emp.salary << endl;
    cout << "Manager Details:" << endl;
    cout << "Name: " << mgr.nmae << endl;
    cout << "Salary: " << mgr.salary << endl;
    cout << "Department: " << mgr.department << endl;
    
    return 0;
}