# Check the string

A. Check the string

time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

A has a string consisting of some number of lowercase English letters 'a'. He gives it to his friend B who appends some number of letters 'b' to the end of this string. Since both A and B like the characters 'a' and 'b', they have made sure that at this point, at least one 'a' and one 'b' exist in the string.

B now gives this string to C and he appends some number of letters 'c' to the end of the string. However, since C is a good friend of A and B, the number of letters 'c' he appends is equal to the number of 'a' or to the number of 'b' in the string. It is also possible that the number of letters 'c' equals both to the number of letters 'a' and to the number of letters 'b' at the same time.

You have a string in your hands, and you want to check if it is possible to obtain the string in this way or not. If it is possible to obtain the string, print "YES", otherwise print "NO" (without the quotes).

Input

The first and only line consists of a string SS (1≤|S|≤50001≤|S|≤5000). It is guaranteed that the string will only consist of the lowercase English letters 'a', 'b', 'c'.

Output

Print "YES" or "NO", according to the condition.

Examples

input

Copy

aaabccc


output

Copy

YES


input

Copy

bbacc


output

Copy

NO


input

Copy

aabc


output

Copy

YES

#include <stdio.h>
int main()
{
char s[5001];
int a=0,b=0,c=0,flag=0,flag1=0,flag2=0,m=0,i;
gets(s);
for(i=0;s[i];i++)
{
if(s[i]=='a')
{
if(flag1||flag2)
{
printf("NO\n");
return 0;
}
a++;flag=1;
}
else
if(s[i]=='b')
{
if(!flag||flag2)
{
m=1;
break;
}
b++;flag1=1;
}
else
if(s[i]=='c')
{
if(!flag||!flag1)
{
m=1;
break;
}
c++;
flag2=1;
}
}
if(m==1)
printf("NO\n");
else
if(c==a&&c||c==b&&b)
printf("YES\n");
else
printf("NO\n");
return 0;
}