#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  while (cin >> s) {
    int c[26] = {0};
    int kk[26] = {0};
    int shu = 0;
    int dan = 0;
    int max = 0;
    int cnt = 0;
    int cnt2 = 0;
    int acc = 0;
    for (int i = 0; i < s.length(); i++) {
      c[s[i] - 'a']++;
    }
    for (int i = 0; i < 26; i++) {
      if (c[i] % 2 == 0) {
        kk[cnt++] = c[i];
        acc += c[i];
        shu += c[i];
        if (c[i] > max) max = c[i];
      } else {
        kk[cnt++] = (c[i] - 1);
        acc += (c[i] - 1);
        shu += (c[i] - 1);
        dan = c[i];
        cnt2++;
      }
    }
    if (max <= (acc - max + 2) &&
        (cnt2 >= 2 || (cnt2 == 1 && dan > 1 && dan < (shu + 1))))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
