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
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
		
		String s = in.readLine();
		
		int numA = 0;
		int numB = 0;
		int numC = 0;
		
		int length = s.length();
		
		for(int i = 0; i < length; i++){
			if(s.charAt(i) == 'a'){
				numA++;
			}else if(s.charAt(i) == 'b'){
				numB++;
			}
			else{
				numC++;
			}
		}
		
		//System.err.println(numA + " " + numB + " " + numC);
		
		//compare A and B
		if(Math.abs(numA - numB) > 1){
			//System.err.println("A - B");
			out.write("NO" + "\n");
		}
		else if(Math.abs(numA - numC) > 1){
			//System.err.println("A - C");
			out.write("NO" + "\n");
		}
		else if(Math.abs(numB - numC) > 1){
			//System.err.println("B - C");
			out.write("NO" + "\n");
		}
		else{
			out.write("YES" + "\n");
		}
		
		
		
		
		out.close();
		in.close();
	}
}
