This page is still under construction.

Parts of this page are still being built. What you see may change.

Easy-to-Pronounce Words

Interview

Time limit1sMemory limit1024 MB

Summary
Given a lowercase word, print 1 if its vowels and consonants strictly alternate, and 0 otherwise.
Level

Easy2 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

A word is easy-to-pronounce if every vowel in the word is immediately followed by a consonant, and every consonant is immediately followed by a vowel. The first letter can be a vowel or a consonant. The vowels are a, e, i, o, u. The letter y is not a vowel, so it counts as a consonant.

Given a word, print 1 if it is easy-to-pronounce, and 0 otherwise.

Input

There is one input line. It contains a word of 1 to 30 lowercase letters, starting in column 1. The input has no characters other than lowercase letters.

Output

Print 1 if the word is easy-to-pronounce, and 0 otherwise.

Examples4

  1. Example 1

    Input
    contest
    
    Expected output
    0
    
  2. Example 2

    Input
    coaches
    
    Expected output
    0
    
  3. Example 3

    Input
    cocahes
    
    Expected output
    1
    
  4. Example 4

    Input
    ali
    
    Expected output
    1