#include<iostream>
#include<string>
using namespace std;
bool detectCapitalUse(string word) {
int len = word.length();
if (len == 0) {
return false;
}
int count = 0;
for (int i = 0; i < len; i++) {
if (word[i] <= 'Z' && word[i] >= 'A') {
count++;
}
}
if (count == len || (count == 1 && word[0] >= 'A' && word[0] <= 'Z') || count == 0)
{
return true;
}
return false;
}
int main()
{
string str;
getline(cin, str);
if (detectCapitalUse(str) == 1) {
cout << "true";
}
else {
cout << "false";
}
return 0;
}