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.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		char[] ch = S.toCharArray();

		int a=0;
		int b=0;
		int c=0;
		for (char cs : ch){
			if(cs=='a') a++;
			if(cs=='b') b++;
			if(cs=='c') c++;
		}



		if(a==b && b==c){
			System.out.println("YES");
			System.exit(0);
		}

		if(a==b+1 && a==c+1){
			System.out.println("YES");
			System.exit(0);
		}

		if(b==c+1 && b==a+1){
			System.out.println("YES");
			System.exit(0);
		}
		if(c==a+1 && c==b+1){
			System.out.println("YES");
			System.exit(0);
		}

		if(a==b-1 && a==c-1){
			System.out.println("YES");
			System.exit(0);
		}

		if(b==c-1 && b==a-1){
			System.out.println("YES");
			System.exit(0);
		}
		if(c==a-1 && c==b-1){
			System.out.println("YES");
			System.exit(0);
		}



		System.out.println("NO");
	}

}
