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.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Random;
import java.util.StringTokenizer;

public class Solution {
    private FastScanner in;
    private PrintWriter out;

    class Pair implements Comparable<Pair> {
        long x, y;

        Pair(long x, long y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;

            Pair pair = (Pair) o;

            return x == pair.x && y == pair.y;
        }

        @Override
        public int hashCode() {
            int result = (int) (x ^ (x >>> 32));
            result = 31 * result + (int) (y ^ (y >>> 32));
            return result;
        }

        @Override
        public int compareTo(Pair o) {
            return x == o.x ? Long.compare(y, o.y) : Long.compare(x, o.x);
        }
    }

    class Triplet {
        long x, y, f;

        Triplet(long x, long y, long f) {
            this.x = x;
            this.y = y;
            this.f = f;
        }
    }

    private void solve() throws IOException {
        /*
        long b = System.nanoTime();
        int n = 1000000, umax = 2000000001, abs = 1000000000;
        Random rand = new Random();

        for (int i = 0; i < 5; i++) {
            out.println(n);
            for (int j = 0; j < n; j++)
                out.print((rand.nextInt(umax) - abs) + " ");
            out.println();
            out.println();
        }

        for (int i = 0; i < 5; i++) {
            out.println(n);
            for (int j = 0; j < n; j++)
                out.print(rand.nextInt() + " ");
            out.println();
            out.println();
        }

        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = i - n / 2;

        for (int i = 0; i < 10; i++) {
            out.println(n);
            shuffle(a);
            for (int j = 0; j < n; j++)
                out.print(a[j] + " ");
            out.println();
            out.println();
        }

        System.out.println((System.nanoTime() - b) / 1e6);*/

        char[] s = in.next().toCharArray();

        HashMap<Character, Integer> map = new HashMap<>();
        for (char c : s)
            map.put(c, map.getOrDefault(c, 0) + 1);

        out.print(map.size() == 4 ||
                (map.size() == 3 && Collections.max(map.values()) > 1) ||
                (map.size() == 2 && map.values().toArray(new Integer[2])[0] > 1
                        && map.values().toArray(new Integer[2])[1] > 1)
                ? "Yes" : "No");
    }

    private void shuffle(int[] array) {
        int index, temp;
        Random random = new Random();
        for (int i = array.length - 1; i > 0; i--) {
            index = random.nextInt(i + 1);
            temp = array[index];
            array[index] = array[i];
            array[i] = temp;
        }
    }

    class FastScanner {
        StringTokenizer st;
        BufferedReader br;

        FastScanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

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

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

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

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

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

        boolean ready() throws IOException {
            return br.ready();
        }

    }

    private void run() throws IOException {
        in = new FastScanner(System.in); // in = new FastScanner(new FileInputStream(".in"));
        out = new PrintWriter(System.out); // out = new PrintWriter(new FileOutputStream(".out"));

        solve();

        out.flush();
        out.close();
    }

    public static void main(String[] args) throws IOException {
        new Solution().run();
    }
}