#include <bits/stdc++.h>
int main() {
  char str[200005];
  int s[3] = {};
  scanf("%s", str);
  int a = strlen(str);
  for (int i = 0; i < a; i++) {
    if (str[i] == 'a') {
      s[0]++;
    } else if (str[i] == 'b') {
      s[1]++;
    } else {
      s[2]++;
    }
  }
  int x = s[0] - s[1];
  int y = s[1] - s[2];
  int z = s[2] - s[0];
  if ((x == 1 || x == 0 || x == -1) && (y == 1 || y == 0 || y == -1) &&
      (z == 1 || z == 0 || z == -1)) {
    printf("Yes");
    return 0;
  }
  printf("No");
}
