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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Arrays;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author 4erneff
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            char[] word = in.nextString().toCharArray();

            HashMap<Character, Integer> mp = new HashMap<>();

            for (int i = 0; i < word.length; i++) {
                if (mp.containsKey(word[i])) {
                    mp.put(word[i], mp.get(word[i]) + 1);
                } else {
                    mp.put(word[i], 1);
                }
            }

            int br = 0;
            char[] arr = new char[30];
            for (Character ch : mp.keySet()) {
                arr[br] = ch;
                br++;
            }

            if (br > 4) {
                out.println("No");
                return;
            }

            for (int i = 0; i < br; i++) {
                for (int j = 0; j < br; ++j) {
                    for (int k = 0; k < br; k++) {
                        for (int l = 0; l < br; l++) {
                            if (i == j || k == l) {
                                continue;
                            }
                            if (new HashSet<Integer>(Arrays.asList(i, j, k, l)).size() != br) {
                                continue;
                            }

                            int brs[] = new int[4];
                            brs[i]++;
                            brs[j]++;
                            brs[k]++;
                            brs[l]++;

                            if (brs[i] > mp.get(arr[i])) continue;
                            if (brs[j] > mp.get(arr[j])) continue;
                            if (brs[k] > mp.get(arr[k])) continue;
                            if (brs[l] > mp.get(arr[l])) continue;

//                        out.println(String.format("%d %d %d %d", i , j , k , l));
                            out.println("Yes");
                            return;
                        }
                    }
                }
            }

            out.println("No");
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        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 nextString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c);
                }
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}