/1008/problem/A Romaji

A. Romaji

time limit per test

2 seconds

memory limit per test

256 megabytes

input

standard input

output

standard output

Vitya has just started learning Berlanese language. It is known that Berlanese uses the Latin alphabet. Vowel letters are "a", "o", "u", "i", and "e". Other letters are consonant.

In Berlanese, there has to be a vowel after every consonant, but there can be any letter after any vowel. The only exception is a consonant "n"; after this letter, there can be any letter (not only a vowel) or there can be no letter at all. For example, the words "harakiri", "yupie", "man", and "nbo" are Berlanese while the words "horse", "king", "my", and "nz" are not.

Help Vitya find out if a word ss is Berlanese.

Input

The first line of the input contains the string ss consisting of |s||s| (1≤|s|≤1001≤|s|≤100) lowercase Latin letters.

Output

Print "YES" (without quotes) if there is a vowel after every consonant except "n", otherwise print "NO".

You can print each letter in any case (upper or lower).

Examples

input

Copy

sumimasen

output

Copy

YES

input

Copy

ninja

output

Copy

YES

input

Copy

codeforces

output

Copy

NO

Note

In the first and second samples, a vowel goes after each consonant except "n", so the word is Berlanese.

In the third sample, the consonant "c" goes after the consonant "r", and the consonant "s" stands on the end, so the word is not Berlanese.

#include <cstdio>
#include <iostream>
#include <string>
#include <cstring>
#include <sstream>
using namespace std;


int main()
{
    char x[105];
    cin>>x;
    int flag=0;
    for(int i=1; i<strlen(x); i++)
    {
        if(x[i-1]=='a'||x[i-1]=='e'||x[i-1]=='i'||x[i-1]=='o'||x[i-1]=='u'||x[i-1]=='n')
            continue;
        else
        {
            if(x[i]=='a'||x[i]=='e'||x[i]=='i'||x[i]=='o'||x[i]=='u')
                continue;
            else
            {
                flag=1;
                break;
            }
        }
    }
    if(x[strlen(x)-1]=='a'||x[strlen(x)-1]=='e'||x[strlen(x)-1]=='i'||x[strlen(x)-1]=='o'||x[strlen(x)-1]=='u'||x[strlen(x)-1]=='n')
        ;
    else
    {
        flag=1;
    }
    if(flag)
        cout<<"NO";
    else
        cout<<"YES";
}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值