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 "bits/stdc++.h"

typedef long long ll;
using namespace std;

const ll MOD = 1e9+7;
const ll INF = 1e18+7;

signed main(){
	string s;
	cin >> s;

	int n = s.size();
	vector<int> v(3);
	v[0] = count(s.begin(), s.end(), 'a');
	v[1] = count(s.begin(), s.end(), 'b');
	v[2] = count(s.begin(), s.end(), 'c');
	sort(v.begin(), v.end(), greater<int>());

	int arr1 = n / 3 + (n % 3 >= 1);
	int arr2 = n / 3 + (n % 3 >= 2);
	int arr3 = n / 3;
	cout << (arr1 > v[0] || arr2 > v[1] || arr3 > v[2] ? "NO" : "YES") << endl;
}
