477. Detect Capital
EasyString
Print YES if the word's capitals are used correctly — all capitals, no capitals, or only the first letter capital — else NO.
Input format
One word
Output format
YES or NO
Example 1
Input
USA
Output
YES
Example 2
Input
FlaG
Output
NO
Constraints
1 ≤ |w| ≤ 100
Read input from standard input and print the answer to standard output. Your code is judged against 5 test cases, most of them hidden.
Loading the MyLoginn IDE…