Problem: Let's call a string adorable if its letters can be realigned in such a way that they form two consequent groups of equal symbols (note that different groups must contain different symbols). For example, ababa is adorable (you can transform it to aaabb, where the first three letters form a group of a-s and others — a group of b-s), but cccc is not since in each possible consequent partition letters in these two groups coincide.

You're given a string s. Check whether it can be split into two non-empty subsequences such that the strings formed by these subsequences are adorable. Here a subsequence is an arbitrary set of indexes of the string.

Input

The only line contains s (1 ≤ |s| ≤ 105) consisting of lowercase latin letters.

Output

Print «Yes» if the string can be split according to the criteria above or «No» otherwise.

Each letter can be printed in arbitrary case.

Examples

Input

ababa


Output

Yes


Input

zzcxx


Output

Yes


Input

yeee


Output

No

Note

In sample case two zzcxx can be split into subsequences zc and zxx each of which is adorable.

There's no suitable partition in sample case three.

Solution (in JAVA):

Solution:
import java.util.Scanner;
import java.util.*;

public class Adorable {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.nextLine();
		in.close();
		System.out.println(found(s));
	}
	
	//aaabbbbcccddd, each ge 1
	//abbc, second ge 2
	//abcc
	//aabb, first, second ge2
	
	//aabcc
	//aacc
	//P >= 4 OK.
	//abcd
	//abab
	//abcb
	// P == 5
	//ababa
	//abcab
	
	/**
	 * CASE 1:
	 * partition left & rgith
	 * aa|bb
	 * Case 2:
	 * a|ab|b
	 * Case 3:
	 * a b a b a
	 * n = 2:
	 * just check if both of them have /ge 2
	 * n = 3
	 * abcabcabcabc //if any two of the three have /ge 2
	 * n = 4
	 * abcdabcdabcdabcd possible
	 * @param s
	 * @return
	 */
	
	public static String found(String s) {
		if (s.length() == 0) return "No";
		Map<Character,Integer> map = new HashMap<>();
		for (int i = 0; i < s.length(); i++) {
			int count = 1;
			if (map.containsKey(s.charAt(i))) {
				count = map.get(s.charAt(i)) + 1;
			}
			map.put(s.charAt(i), count);
		}
		if (map.size() == 2) {
			for (Map.Entry<Character, Integer> e : map.entrySet()) {
				if (e.getValue() < 2) return "No";
			}
			return "Yes";
		}
		if (map.size() == 3) {
			for (Map.Entry<Character, Integer> e : map.entrySet()) {
				if (e.getValue() >= 2) return "Yes";
			}
			return "No";
		}
		if (map.size() == 4) {
			return "Yes";
		}
		return "No";
	}
	
	/**
	public static String found(String s) {
		if (s.length() == 0) return "No";
		int partitions = 0;
		int i = 0;
		int count = 0;
		Map<Character,Integer> map = new HashMap<>();
		char second = ' ';
		char third = ' ';
		Set<Character> encountered = new HashSet<>();
		while (i < s.length()) {
			if (i+1 == s.length() || s.charAt(i) != s.charAt(i+1)) {
				partitions++;
				if (partitions == 2) second = s.charAt(i);
				if (partitions == 3) third = s.charAt(i);
				map.put(s.charAt(i), count);
				encountered.add(s.charAt(i));
			} else {
				count++;
			}
			i++;
		}
		if (partitions == 5) {
			if (encountered.size() == 2) return "Yes";
			return "No";
		}
		if (partitions == 4) {
			for (Map.Entry<Character, Integer> e : map.entrySet()) {
				if (e.getValue() <= 1) return "No";
			}
			return "Yes";
		}
		if (partitions == 3) {
			if (map.get(second) >= 2) return "Yes";
			return "No";
		}
		if (partitions == 2) {
			if (map.get(second) >= 2 && map.get(s.charAt(0)) >= 2) return "Yes";
			return "No";
		}
		return "No";
	}
	*/
}