
#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<cstring>
#include<utility>
#include<queue>
#include<map>
#include<cmath>
using namespace std;
#define REP(i, a,b) for(i=a;i<b;i++) 
#define REP1(i,b,a) for(i=b-1;i>=a;i--)
#define output(x) cout<<x<<endl;
#define pb(x) push_back(x);
typedef long long int ll;
const int MAX = 510000;
const int MOD = 1000000007;

int main()
{

	ll i, j, k, l, m, flag, N, M, K, H, W, X, P,A,B,C;
	char S[100001];
	cin >> S;
	int num[3] = {};
	REP(i, 0, strlen(S)) {
		if (S[i] == 'a') {
			if (num[0] > 0) {
				if (i - num[0] != 2) {
					output("NO");
					return 0;
				}
			}
			num[0] = i;

		}
		if (S[i] == 'b') {
			if (num[1] > 0) {
				if (i - num[1] != 2) {
					output("NO");
					return 0;
				}
			}
			num[1]=i;
		}
		if (S[i] == 'c') {
			if (num[2] > 0) {
				if (i - num[2] != 2) {
					output("NO");
					return 0;
				}
			}
			num[2]=i;
		}
	}

	output("YES");
	return 0;
}



