#include<iostream>
#include<string>
using namespace std;
int main()
{
    string usernamel
    int age;
    if(!(getline(cin,username)))
    return 0;
    if(!(cin>>age))
    return 0;
    if(username.length()<3)
    {
        cout<<"Invalid username"<<endl;
    }
    else if(age<18||age>100)
    {
        cout<<"Invalid age"<<endl;
    }
    else
    {
        cout<<"Registration successful";
    }
    return 0;
}