map的赋值用法

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

sumimasen

Output

YES

Input

ninja

Output

YES

Input

codeforces

Output

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.

Vitya刚刚开始学习Berlanese语言。众所周知,Berlanese使用拉丁字母。元音字母是“a”,“o”,“u”,“i”和“e”。其他字母是辅音。

在贝拉尼斯,每个辅音后都必须有一个元音,但任何元音后都可以有任何字母。唯一的例外是辅音“n”;在这封信之后,可以有任何字母(不仅是元音),也可能没有任何字母。例如,“harakiri”,“yupie”,“man”和“nbo”这两个词是Berlanese,而“horse”,“king”,“my”和“nz”这两个词则不是。

帮助Vitya找出一个单词ss是否是Berlanese。

输入
输入的第一行包含由| s || s |组成的字符串ss (1≤| s |≤1001≤| s |≤100)小写拉丁字母。

产量
如果除了“n”之外的每个辅音后面都有一个元音,则打印“YES”(不带引号),否则打印“NO”。

您可以在任何情况下(上部或下部)打印每个字母。

例子
输入
sumimasen
产量

输入
忍者
产量

输入
codeforces
产量
没有
注意
在第一个和第二个样本中,除了“n”之外,元音在每个辅音之后,所以这个词是Berlanese。

在第三个样本中,辅音“c”跟在辅音“r”之后,辅音“s”站在最后,所以这个词不是Berlanese。

#include <iostream>
#include <map>
#include <cstring>
#include <string>
#include <cstdio>
#include <queue>
#include <set>
#include <stack>
#include <iomanip>
#include <cstdlib>
#include <cmath>
#include <algorithm>
using namespace std;
#define ll long long
#define ull unsigned long long
#define GG return(0)
#define mem(a,b) memset(a,b,sizeof(a))
#define pr(a) printf("%d\n",a)
#define sc(a) scanf("%d",&a)
#define pb push_back
#define be begin()
#define en end()
#define si size()
#define le length()
#define PI M_PI
#define re reverse  // µ¹ÖÃ
#define FAST_IO ios::sync_with_stdio(false)
#define wt int t;cin>>t;while(t--)
#define wtf int t;cin>>t;for(int ca=1;ca<=t;ca++)
#define fr(a,b) for(int i=a;i<b;i++)
const int N = 2e5 + 5;
const int M = 1e5 + 5;
const int INF = 0x3f3f3f3f;
map<char,int>mp;
void init()
{
	mp['a']=1;
	mp['e']=1;
	mp['i']=1;
	mp['o']=1;
	mp['u']=1;
}

int main()
{
	FAST_IO;
	string s;
	cin>>s;
	init();
	int m=s.length();
	for(int i=0;i<m;i++){
		if(s[i]=='n') continue;
		if(mp[s[i]]==0){
			if(mp[s[i+1]]==0){
				//cout<<s[i+1]<<endl;
				cout<<"NO"<<endl;
				return 0;
			}
		}
	}
	cout<<"YES"<<endl;
	GG;
}

猜你喜欢

转载自blog.csdn.net/xyy19990130/article/details/82081709