Snuke has a string S consisting of three kinds of letters: `a`, `b` and `c`.

He has a phobia for palindromes, and wants to permute the characters in S so that S will not contain a palindrome of length 2 or more as a substring. Determine whether this is possible.

Constraints

* 1 \leq |S| \leq 10^5
* S consists of `a`, `b` and `c`.

Input

Input is given from Standard Input in the following format:


S


Output

If the objective is achievable, print `YES`; if it is unachievable, print `NO`.

Examples

Input

abac


Output

YES


Input

aba


Output

NO


Input

babacccabab


Output

YES
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<map>
#include<iomanip>
#include<queue>
#include<stack>
#include<time.h>
#define rep(i,n)for(ll i=0;i<n;i++)
#define ll long long
#define double long double
#define pi 3.141592653589
using namespace std;
ll cnt[26];
signed main() {
	string s;
	cin >> s;
	rep(i, s.size())cnt[s[i] - 'a']++;
	rep(i, 26) {
		if ((s.size() - 1) / 3 + 1 < cnt[i]) {
			puts("NO");
			return 0;
		}
	}
	puts("YES");
	getchar(); getchar(); return 0;
}