// editor4
#include <iostream>
#include <string>
using namespace std;

class Person
{
    private: string s; float p;
    Person(string s, float p)
    {
        this -> s = s;
        this -> p = p;
    }
};

class Employee: public Person
{
    display();
}

int main()
{
    string s;
    float p;
    getline(cin, s);
    cin >> p;
    
    bool f = 0;
    
    for(char c: s)
    {
        if(!((c>=65 && c<=90) || (c>=97 && c<=122) || (c == ' ')))
        f = 1;
    }
    
    if(f == 0 && p >= 0)
    {
        cout << s << endl << p;
    }
    else
    cout << "Invalid input";
    
}