Nice Words
View as PDFYour task is to figure out which words are nice with Parsa's defenition of nice!
Input
The input consists of a single string of uppercase letters A-Z. The length of the string is between 1 and 10 characters, inclusive.
Output
Print YES if the word is nice. Otherwise print NO.
Constraints
Example 1
Input
NICE
NO
Example 2
Input
WORD
NO
Example 3
Input
TAXI
YES
Example 4
Input
WAVE
YES
Example 5
Input
YES
NO
Example 6
Input
NO
NO
Example 7
Input
COCO
YES
Example 8
Input
CUB
YES
Comments