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.IOException;
import java.math.BigInteger;
import java.util.*;
import java.io.*;
public class ll {
    public static void main(String[] args) throws Exception {
        gg g = new gg();
    }

}
class gg {
    int[] p;
    int[] rank;
    int[] umsg, rmsg;
    boolean[] g;
    int[] hui;
    int n;
    long k;
    int[] sended;
    PrintWriter pw;
    int lead;
    int[] mas;
    TreeSet<Integer> fiiq;
    ArrayList<int[]> ans;
    TreeSet<Integer> sset[];
    long dp[][];
    boolean[] checked;
    int mo;
    ArrayList<Integer>[] tree;
    gg() throws Exception {
      //         FScanner fs = new FScanner(new FileReader("sequences.in"));
    //  pw = new PrintWriter("sequences.out");
       FScanner fs = new FScanner(new InputStreamReader(System.in));
      pw = new PrintWriter(System.out);
        char[] a = fs.nextLine().toCharArray();
        int[] chars = new int['z'-'a'+1];
        for (int i =0 ; i<a.length; i++)
            chars[a[i]-'a']++;
        int s = 0;
        for (int i = 0; i<chars.length; i++) {
            if (chars[i] !=0)
                s++;
        }
        if (s <=1 || s> 4)
            System.out.println("No");
        else {
            if (s == 4) {
                System.out.println("Yes");
            } else if (s == 3) {
                boolean ok = false;
                for (int i = 0; i<chars.length; i++)
                    if (chars[i] > 1)
                        ok = true;
                if (ok)
                    System.out.println("Yes");
                else System.out.println("No");
            } else {
                boolean ok = true;
                for (int i = 0; i<chars.length; i++)
                    if (chars[i] !=0 && chars[i] == 1)
                        ok = false;
                if (ok)
                    System.out.println("Yes");
                else System.out.println("No");
            }
        }
        pw.close();
    }
    long[][] pow(long[][] mat, long val) {
        if (val == 1)
            return mat;
        if (val%2 == 0) {
            long[][] m = pow(mat, val/2);
            return mul(m, m);
        } else {
            val--;
            long[][] ss = mat.clone();
            return mul(pow(mat, val), ss);
        }
    }
    long[][] mul(long[][] m1, long[][] m2) {
        int a1 = m1.length, a2 = m1[0].length,  a3 = m2[0].length;
        long[][] ff = new long[a1][a3];
        for (int i = 0; i<a1; i++) {
            for (int j = 0; j<a3; j++)
                for (int s =0 ;s<a2; s++)
                    ff[i][j] = (ff[i][j]+m1[i][s]*m2[s][j])%mo;
        }
        return ff;
    }
    void dfs(int cur, long[] a, long[] b, long[] c) {
        checked[cur] = true;
        for (int i = 0; i<tree[cur].size(); i+=2) {
            if (!checked[tree[cur].get(i)]) {
                dfs(tree[cur].get(i), a, b, c);
                a[cur] = Math.max(a[cur], b[tree[cur].get(i)]+tree[cur].get(i+1)-c[tree[cur].get(i)]);
                b[cur]+=c[tree[cur].get(i)];
            }
        }
        a[cur]+=b[cur];
        c[cur]= Math.max(a[cur], b[cur]);

    }
    void find(int i, int j, ArrayList<Integer> ans, int[][] dp, int[] w) {
        if (dp[i][j] == 0)
            return;
        if (dp[i-1][j] == dp[i][j])
            find(i-1, j, ans, dp, w);
        else {
            ans.add(i);
            find(i-1, j-w[i-1], ans, dp, w);
        }
    }
    void next(int[] bitmask) {
        int r = 0;
        while (bitmask[r] == 1)
            bitmask[r++] = 0;
        bitmask[r] = 1;
    }



}
class Pair implements Comparable<Pair> {
    int x, y;
    Pair(int x1, int y1) {
        x = x1;
        y = y1;
    }

    @Override
    public boolean equals(Object obj) {
        if (x == ((Pair) (obj)).x)
            if (y == ((Pair) (obj)).y)
                return true;
        else return false;
        else return false;
    }

    @Override
    public int compareTo(Pair o) {
        if (x == o.x)
            return Integer.compare(y, o.y);
        else return Integer.compare(x, o.x);
    }
}


class FScanner {
    StringTokenizer st;
    BufferedReader reader;
    FScanner(InputStreamReader isr) throws IOException {
        reader = new BufferedReader(isr);
    }

    String nextLine() throws IOException {
        return reader.readLine();
    }

    String nextToken() throws IOException{
        while (st == null || !st.hasMoreTokens()) {
            String s = reader.readLine();
                 if (s == null)
                return null;
            st = new StringTokenizer(s);
        }
        return st.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    char nextChar() throws IOException {
        return (char) reader.read();
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    int[] iarr(int n) throws IOException {
        int[] mas = new int[n];
        for (int i =0 ; i<n; i++)
            mas[i] = nextInt();
        return mas;
    }

    double[] darr(int n) throws IOException {
        double[] mas = new double[n];
        for (int i =0 ; i<n; i++)
            mas[i] = nextDouble();
        return mas;
    }

    char[][] cmas2 (int n, int m) throws IOException {
        char[][] mas = new char[n][m];
        for (int i =0 ; i<n; i++)
            mas[i] = nextLine().toCharArray();
        return mas;
    }

    long[] larr(int n) throws IOException {
        long[] mas = new long[n];
        for (int i =0 ; i<n; i++)
            mas[i] = nextLong();
        return mas;
    }
}