#include<bits/stdc++.h>
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
    char s[100100],i,num_a=0,num_b=0,num_c=0;
    scanf("%s",s);
    int n=strlen(s);
    for(i=0;i<n;i++)
    {
        if(s[i]=='a') num_a++;
        if(s[i]=='b') num_b++;
        if(s[i]=='c') num_c++;
    }
    int m=max(num_a,max(num_b,num_c));
    if(m-num_a<2&&m-num_b<2&&m-num_c<2) printf("YES");
    else printf("NO");
}
