#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  int C[3] = {};
  cin >> S;
  for (int i = 0; i < S.size(); i++) {
    C[i - 97]++;
  }
  sort(C, C + 3);
  if (C[2] - C[0] <= 1)
    cout << "YES";
  else
    cout << "NO";
}
