#include <iostream>
#include <string>
using namespace std;

class Person{
protected:   
    string name:
public:   
    void setName(string n){
        name = n;
    }
    string getName(){
        return name;
    }
};

class Employee: public Person{
private:    
    float salary;
public:    
    bool setSalary(float s){
        if (s<0){
            return false; 
        }
        salary s;
        return true;
    }
    
    void displayDetails(){
        cout << name << " "<< salary << endl;
    }
    
};
int main(){
    string empName;
    float empSalary;
    
    if (!getline(cin,empName))
    return 0;
    
    if (!(cin >> empSalary))
    return 0;
    
    Employee emp;
    emp.setName(empName);
    
    if(emp.setSalary(empSalary)){
        emp.displayDetails();
    }
    else {
        cout << "Invalid input"<<endl;
    }
    return 0;
}