#C829. Vowel Contest Winner
Vowel Contest Winner
Vowel Contest Winner
You are given a string S
. Your task is to determine whether the string S
starts and ends with a lowercase vowel. The vowels are defined as \(\{a, e, i, o, u\}\). If both the first and the last characters of S
are vowels, print "YES"; otherwise, print "NO".
Note: The input string is expected to be in lowercase. Uppercase letters are not considered vowels for the purpose of this problem.
Examples:
- For input
apple
, the output isYES
since 'a' and 'e' are vowels. - For input
banana
, the output isNO
because it does not start with a vowel. - For input
kiwi
, the output isNO
since it does not end with a vowel.
inputFormat
The input consists of a single line containing the string S
. The string will only contain English letters.
outputFormat
Output a single line containing either YES
if both the first and last characters of the string are vowels, or NO
otherwise.
apple
YES