#include <iostream>
#include <algorithm>
#include <cctype>
#include <ios>
bool isNumber( std:: string const & str)
{
bool isNegative = ( str[ 0 ] == '-' ) ;
bool metDecimalDot = false ;
return std:: all_of ( str.cbegin ( ) + isNegative, str.cend ( ) , [ & ] ( char ch) {
return isdigit ( ch) || ( ! metDecimalDot && ( metDecimalDot = ( ch == '.' ) ) ) ;
} ) ;
}
int main( ) {
std:: string input;
while ( std:: cin >> input) {
std:: cout << std:: boolalpha << "Is '" << input << "' a number? " << isNumber( input) << "\n " ;
}
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8Y2N0eXBlPgojaW5jbHVkZSA8aW9zPgoKYm9vbCBpc051bWJlcihzdGQ6OnN0cmluZyBjb25zdCAmc3RyKQp7CiAgICBib29sIGlzTmVnYXRpdmUgPSAoc3RyWzBdID09ICctJyk7CiAgICBib29sIG1ldERlY2ltYWxEb3QgPSBmYWxzZTsKICAgIHJldHVybiBzdGQ6OmFsbF9vZihzdHIuY2JlZ2luKCkgKyBpc05lZ2F0aXZlLCBzdHIuY2VuZCgpLCBbJl0oY2hhciBjaCkgewogICAgICAgIHJldHVybiBpc2RpZ2l0KGNoKSB8fCAoIW1ldERlY2ltYWxEb3QgJiYgKG1ldERlY2ltYWxEb3QgPSAoY2ggPT0gJy4nKSkpOwogICAgfSk7Cn0KCmludCBtYWluKCkgewoJc3RkOjpzdHJpbmcgaW5wdXQ7Cgl3aGlsZSAoc3RkOjpjaW4gPj4gaW5wdXQpIHsKCQlzdGQ6OmNvdXQgPDwgc3RkOjpib29sYWxwaGEgPDwgIklzICciIDw8IGlucHV0IDw8ICInIGEgbnVtYmVyPyAiIDw8IGlzTnVtYmVyKGlucHV0KSA8PCAiXG4iOwoJfQoJcmV0dXJuIDA7Cn0=