#include <bits/stdc++.h>
using namespace std;
long long i;
string s, ans1, ans2, ans3, ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  for (i = 0; i < s.size(); i++) {
    if (s[i] == 'a') ans1 += "a";
    if (s[i] == 'b') ans2 += "b";
    if (s[i] == 'c') ans3 += "c";
  }
  if (ans3.size() != ans1.size() && ans3.size() != ans2.size()) {
    cout << "NO" << endl;
    return 0;
  }
  if (ans1.size() == 0 || ans2.size() == 0 || ans3.size() == 0) {
    cout << "NO" << endl;
    return 0;
  }
  ans = ans1 + ans2 + ans3;
  if (ans == s)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
