#include <bits/stdc++.h>
using namespace std;
int main() {
  string second;
  cin >> second;
  vector<long long> v(3, 0);
  for (long long i = 0; i < (long long)(((long long)(second).size())); i++) {
    if (second[i] == 'a')
      v[0]++;
    else if (second[i] == 'b')
      v[1]++;
    else
      v[2]++;
  }
  sort((v).begin(), (v).end());
  if (0 < (v[2] - v[0]))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
