#include <bits/stdc++.h>
using namespace std;
const double pi =
    3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;
const int mod = 1000000007;
int main() {
  int a[4] = {}, mn, i, j, n, m;
  string s;
  cin >> s;
  int l = s.length();
  for (int i = (0); i < (l); ++i) {
    a[(s[i] - 'a')]++;
  }
  mn = a[0];
  if (a[1] < mn) mn = a[1];
  if (a[2] < mn) mn = a[2];
  a[0] -= mn;
  a[1] -= mn;
  a[2] -= mn;
  if (a[0] < 2 && a[1] < 2 && a[3] < 2)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
