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.*;
import java.io.*;
import java.text.*;
public class CF{
    static final long mod = (long)163577857, root = 23;
    static int MAX = (int)1e6+1, A = 26, B = 17;
    static FastReader in;
    
    public static void main(String[] args) throws Exception{
        in = new FastReader();
        StringBuilder out = new StringBuilder("");
        boolean yes = true;
        int[] fre = new int[A];
        String s = n();
        for(int i = 0; i< s.length(); i++)fre[s.charAt(i)-'a']++;
        int c = 0;
        int[] co = new int[A];
        for(int i = 0; i< A; i++)if(fre[i]>0)co[c++] = fre[i];
        if(c==1 || c>4)yes = false;
        else{
            if(c==4)yes = true;
            else if(c==2){
                if(co[0]>1 && co[1]>1)yes = true;
                else yes = false;
            }else if(c==3){
                if(co[0]>1 || co[1]>1 || co[2]>1)yes = true;
                else yes = false;
            }
        }
        out.append((yes)?"Yes":"No");
        System.out.print(out.toString());
    }
    
    static long gcd(long a, long b){
        return (b==0)?a:gcd(b,a%b);
    }
    
    static long[] la(int n){
        long[] t = new long[n];
        for(int i = 0; i< n; i++)t[i] = nl();
        return t;
    }
    
    static int[] ia(int n){
        int[] t = new int[n];
        for(int i = 0; i< n; i++)t[i] = ni();
        return t;
    }
    
    static void p(Object o){
        System.out.print(o);
    }
    
    static void pn(Object o){
        System.out.println(o);
    }
    
    static String n(){
        return in.next();
    }
    
    static String nln(){
        return in.nextLine();
    }
    
    static int ni(){
        return Integer.parseInt(in.next());
    }
    
    static long nl(){
            return Long.parseLong(in.next());
    }
    
    static double nd(){
        return Double.parseDouble(in.next());
    }
    
    static class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        
        public FastReader(String s) throws Exception{
            br = new BufferedReader(new FileReader(s));
        }
 
        String next(){
            while (st == null || !st.hasMoreElements()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (IOException  e){
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        String nextLine(){
            String str = "";
            try{
                str = br.readLine();
            }catch (IOException e){
                e.printStackTrace();
            }
            return str;
        }
    }
}