Cheerio Contest 1 J1 - Pronounceable Words

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 512M

Author:
Problem type

A word is considered pronounceable if it consists of letters alternating between vowels and consonants. Given a word, determine whether it is pronounceable.

The letters aeiou are vowels, while the rest are consonants.

Constraints

For all test cases:

  • The word length will not exceed 1\,000 characters.

Note: You must pass all test cases in order to earn points on this problem.

Input Specification

The first and only line contains a single word containing only lowercase letters.

Output Specification

Output YES if the word is pronounceable. Otherwise, output NO.

Sample Input 1

bananas

Sample Output 1

YES

Sample Input 2

cheerio

Sample Output 2

NO

Comments

There are no comments at the moment.