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.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;


public class Main implements Runnable {
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt() {
            int c = read();

            while(isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if(c<'0'||c>'9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    public static void main(String args[]) throws Exception {
        new Thread(null, new Main(),"Main",1<<26).start();
    }

    static long gcd(long a,long b){ if(b==0)return a;return gcd(b,a%b); }
    static long modPow(long a,long p,long m){ if(a==1)return 1;long ans=1;while (p>0){ if(p%2==1)ans=(ans*a)%m;a=(a*a)%m;p>>=1; }return ans; }
    static long modInv(long a,long m){return modPow(a,m-2,m);}


    void reverse(int a[],int i,int j){
        int size=j-i+1;
        int cc=0;
        for (int k = i; k <=(i+j)/2 ; k++) {
            int temp=a[k];
            a[k]=a[j-cc];
            a[j-cc]=temp;
            cc++;
        }
    }


    String f(String s1,String s2,PrintWriter out){
        int i=s1.length()-1;
        int j=0;
        Stack<Character> ss1=new Stack<>();
        StringBuffer ss2=new StringBuffer("");
        Stack<Character> temp=new Stack<>();
        int max=0;
        while(j<s2.length() && i>=0){
            ss1.add(s1.charAt(i--));
            ss2.append(s2.charAt(j++));
            int ff=0,k;
            int uu=ss1.size();
            for (k = 0; k <Math.min(uu,ss2.length()) ; k++) {
                char tt=ss1.pop();
                temp.add(tt);
                if(ss2.charAt(k)!=tt){
                    ff=1;
                    break;
                }
            }
            if(ff==0){
                max=Math.max(max,Math.min(uu,ss2.length()));
            }
            while (!temp.isEmpty()){
                ss1.add(temp.pop());
            }
        }
        return s1+s2.substring(max,s2.length());
    }
    int  nextper(int a[],int n,PrintWriter out){
        int i;
        for (i = n-2; i >=0 ;) {
            if(a[i]>=a[i+1]){
                i--;
            }
            else{
                break;
            }
        }
        if(i==-1){
            return -1;
        }
        else{
            for (int j = n-1; j >i ;) {
                if(a[i]<a[j]){
                    int temp=a[j];
                    a[j]=a[i];
                    a[i]=temp;
                    reverse(a,i+1,n-1);
                    break;
                }
                else if(a[i]==a[j]){
                    j--;
                }
                else{
                    j--;
                }
            }
        }
        return 0;
    }
    public void run() {
        InputReader sc = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);

        String s=sc.next();
        HashSet<Character> set=new HashSet<>();
        HashMap<Character,Integer> map=new HashMap<>();
        for (int i = 0; i <s.length() ; i++) {
            set.add(s.charAt(i));
            if(map.containsKey(s.charAt(i))){
                int tt=map.get(s.charAt(i));
                map.put(s.charAt(i),++tt);
            }
            else{
                map.put(s.charAt(i),1);
            }
        }
        if(set.size()>4 || set.size()<=1)out.println("No");
        else{
            if(set.size()==2){
               for(char x:set){
                   if(map.get(x)==1){
                       out.println("No");
                       out.close();
                       return;
                   }
               }
               out.println("Yes");
            }
            else if(set.size()==3){
                int ff=0;
                for(char x:set){
                    if(map.get(x)==1){
                        ff++;
                    }
                }
                if(ff==3)out.println("No");
                else out.println("Yes");
            }
            else{
                out.println("Yes");
            }
        }

        out.close();
    }


}