// editor4
#include <iostream>
#include <string>
using namespace std;



int main()
{
    string s;
    float p;
    getline(cin, s);
    cin >> p;
    
    bool f = 0;
    
    for(char c: s)
    {
        if(!((c>='A' c<='Z') || (c>='a' c<='z') || (c == ' ')))
        {
            f = 1;
            break;
        }
    }
    
    if(f == 0 && p >= 0)
    {
        cout << s << endl << p;
    }
    else
    cout << "Invalid input";
   
}