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.lang.*;
import java.text.DecimalFormat;
import java.util.*;

public class Codeforces
{
	static InputReader in = new InputReader(System.in);
	static FastReader fr = new FastReader();
	static OutputWriter out = new OutputWriter(System.out);
	
	static int MOD = 1000000007, prime[];
	static long gcd, x, y;
	static boolean isPrime[];
	static long nCr[][] = new long[1004][1004];
	
	public static void main(String[] args) throws IOException
	{
		String s = in.nextLine();
		int freq[] = new int[26];
		for(int i = 0; i < s.length(); i++)
			freq[(int)(s.charAt(i) - 'a')]++;
		int count = 0;
		for(int i = 0; i < 26; i++)
			if(freq[i] > 0)
				count++;
		if(count == 2) {
			int x = 0;
			for(int i = 0; i < 26; i++) {
				if(freq[i] > 0) {
					x = freq[i];
					break;
				}
			}
			if(x >= 2 && (s.length() - x) >= 2)
				out.printLine("Yes");
			else
				out.printLine("No");
		}
		else if(count == 3) {
			int flag = 0;
			for(int i = 0; i < 26; i++) {
				if(freq[i] >= 2) {
					out.printLine("Yes");
					flag = 1;
					break;
				}
			}
			if(flag == 0)
				out.printLine("No");
		}
		else if(count == 4)
			out.printLine("Yes");
		else
			out.printLine("No");
		out.flush();
		out.close();
	}
	
	static long min_3(long a, long b, long c)
	{
		if(a < b && a < c)
			return a;
		if(b < c)
			return b;
		return c;
	}
	
	static long max_3(long x, long y, long z)
	{
		if(x >= y && x >= z)
			return x;
		if(y >= x && y >= z)
			return y;
		return z;
	}
	
	static long power(long x, long y, long m)
	{
	    if (y == 0)
	        return 1;
	    long p = power(x, y/2, m) % m;
	    p = (p * p) % m;
	    return (y%2 == 0) ? p : (x * p) % m;
	}
	
	static void prime_sieve(int N)
	{
        isPrime = new boolean[N+1];
        Arrays.fill(isPrime, true);
        isPrime[0] = isPrime[1] = false;
        for(int i = 2; i*i <= N; i++)
        {
            if(isPrime[i]==true)
            {
            	for(int j = 2*i; j <= N; j += i)
            	{
            		isPrime[j] = false;
            		prime[j] = i;
				}
            }
        }
    }
	
	static void Calc_nCr()
	{
		for(int i = 0; i <= 1000; i++)
			nCr[i][0] = 1;
		for(int i = 1; i <= 1000; i++)
			for(int j = 1; j <= 1000; j++)
				nCr[i][j] = (nCr[i-1][j-1] + nCr[i-1][j]) % MOD;
	}
	
	static long factorial(long num)
	{
		long result = 1;
		for(int i = 1; i <= num; i++)
			result = result * (long)i;
		return result;
	}
	
	static void ExtendedEuclidian(long a, long b)
	{
		if(b == 0)
		{
	        gcd = a;
	        x = 1;
	        y = 0;
	    }
	    else
	    {
	        ExtendedEuclidian(b, a%b);
	        int temp = (int) x;
	        x = y;
	        y = temp - (a/b)*y;
	    }
	}
	
	static long GCD(long n, long m)
	{
		if(m != 0)
			return GCD(m, n % m);
		else
			return n;
	}
	
	static class CustomComp implements Comparator<Object>
	{
		@Override
        public int compare(Object o1, Object o2)
		{
			return 1;
        }
	}
	
	static class Graph
	{
		
	    private int V;
	    private LinkedList<Integer> adj[];
	    boolean visited[];
	    
	    Graph(int v)
	    {
	        V = v;
	        //visited = new boolean[V];
	        adj = new LinkedList[V];
	        for(int i = 0; i < V; ++i)
	            adj[i] = new LinkedList<Integer>();
	    }
	 
	    void addEdge(int v, int w)
	    {
	        adj[v].add(w);
	        adj[w].add(v);
	    }
	    
	    // prints BFS traversal from a given source s
	    void BFS(int s)
	    {
	        LinkedList<Integer> queue = new LinkedList<Integer>();
	        visited[s] = true;
	        queue.add(s);
	        while (queue.size() != 0)
	        {
	            s = queue.poll();
	            System.out.print(s+" ");
	            Iterator<Integer> i = adj[s].listIterator();
	            while (i.hasNext())
	            {
	                int n = i.next();
	                if (!visited[n])
	                {
	                    visited[n] = true;
	                    queue.add(n);
	                }
	            }
	        }
	    }
	    
	    int count = 0;
	    
	    int DFS(int u, int v) {
	    	visited = new boolean[26];
	    	for(int i = 0; i < 26; i++) {
	    		if(visited[i] == false) {
	    			count = 0;
	    			DFSUtil(i, u, v);
	    			//System.out.println(i+" "+u+" "+v+" "+count);
	    			if(count == 0 && visited[u] == true && visited[v] == true)
	    				return 1;
	    			if(count == 1 && (visited[u] == true || visited[v] == true))
	    				return 1;
	    			if(count == 2)
	    				break;
	    		}
	    	}
	    	return 0;
	    }
	    
	    void DFSUtil(int s, int u, int v)
	    {
	        visited[s] = true;
	        //System.out.println(s);
	        if(s == u)
	        	count++;
	        if(s == v)
	        	count++;
	        if(count == 2)
	        	return;
	        //System.out.println("count "+count);
	        Iterator<Integer> i = adj[s].listIterator();
	        while(i.hasNext())
	        {
	            int n = i.next();
	            if(!visited[n])
	                DFSUtil(n, u, v);
	        }
	    }
	    
	    boolean isCyclicUndirectedUtil(int v, boolean visited[], int parent)
	    {
	        // Mark the current node as visited
	        visited[v] = true;
	        Integer i;
	 
	        // Recur for all the vertices adjacent to this vertex
	        Iterator<Integer> it = adj[v].iterator();
	        while (it.hasNext())
	        {
	            i = it.next();
	 
	            // If an adjacent is not visited, then recur for that
	            // adjacent
	            if (!visited[i])
	            {
	                if (isCyclicUndirectedUtil(i, visited, v))
	                    return true;
	            }
	 
	            // If an adjacent is visited and not parent of current
	            // vertex, then there is a cycle.
	            else if (i != parent)
	                return true;
	        }
	        return false;
	    }
	 
	    // Returns true if the graph contains a cycle, else false.
	    boolean isCyclicUndirected()
	    {
	        // Mark all the vertices as not visited and not part of
	        // recursion stack
	        boolean visited[] = new boolean[V];
	 
	        // Call the recursive helper function to detect cycle in
	        // different DFS trees
	        for (int u = 1; u <= V; u++)
	            if (!visited[u]) // Don't recur for u if already visited
	                if (isCyclicUndirectedUtil(u, visited, -1))
	                    return true;
	 
	        return false;
	    }
	    
	    boolean isCyclicDirectedUtil(int v, boolean visited[], boolean recStack[])
	    {
	    	if(visited[v] == false)
	    	{
	            // Mark the current node as visited and part of recursion stack
	            visited[v] = true;
	            recStack[v] = true;
	     
	            // Recur for all the vertices adjacent to this vertex
	            Iterator<Integer> i = adj[v].listIterator();
	            while(i.hasNext())
	            {
	            	int n = i.next();
	                if (!visited[n] && isCyclicDirectedUtil(n, visited, recStack))
	                    return true;
	                else if (recStack[n])
	                    return true;
	            }
	        }
	        recStack[v] = false;  // remove the vertex from recursion stack
	        return false;
	    }
	    
	    boolean isCyclicDirected()
	    {
	    	boolean visited[] = new boolean[V];
	    	boolean recStack[] = new boolean[V];
	    	for(int i = 1; i <= V; i++)
	            if (isCyclicDirectedUtil(i, visited, recStack))
	                return true;
	    	return false;
	    }
	    
	    void topologicalSortUtil(int v, boolean visited[], Stack stack)
	    {
			// Mark the current node as visited.
			visited[v] = true;
			
			// Recur for all the vertices adjacent to this vertex
			Iterator<Integer> it = adj[v].iterator();
			while (it.hasNext()) {
				int i = it.next();
				if (!visited[i])
					topologicalSortUtil(i, visited, stack);
			}
			
			// Push current vertex to stack which stores result
			stack.push(new Integer(v));
		}
			
		// The function to do Topological Sort. It uses recursive topologicalSortUtil()
		void topologicalSort()
		{
			Stack stack = new Stack();
			
			// Mark all the vertices as not visited
			boolean visited[] = new boolean[V];
			
			// Call the recursive helper function to store Topological Sort starting from all
			// vertices one by one
			for (int i = 1; i <= V; i++)
			if (visited[i] == false)
				topologicalSortUtil(i, visited, stack);
			
			// Print contents of stack
			while (stack.empty()==false)
				System.out.print(stack.pop() + " ");
		}
	}
}

class InputReader
{

    private final InputStream stream;
    private final byte[] buf = new byte[8192];
    private int curChar, snumChars;
    private SpaceCharFilter filter;

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

    public int snext()
    {
            if (snumChars == -1)
                    throw new InputMismatchException();
            if (curChar >= snumChars)
            {
                    curChar = 0;
                    try
                    {
                            snumChars = stream.read(buf);
                    } catch (IOException e)
                    {
                            throw new InputMismatchException();
                    }
                    if (snumChars <= 0)
                            return -1;
            }
            return buf[curChar++];
    }

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

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

    public int[] nextIntArray(int n)
    {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
            {
                    a[i] = nextInt();
            }
            return a;
    }

    public long[] nextLongArray(int n)
    {
            long a[] = new long[n];
            for (int i = 0; i < n; i++)
            {
                    a[i] = nextLong();
            }
            return a;
    }

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

    public String nextLine()
    {
            int c = snext();
            while (isSpaceChar(c))
                    c = snext();
            StringBuilder res = new StringBuilder();
            do
            {
                    res.appendCodePoint(c);
                    c = snext();
            } while (!isEndOfLine(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;
    }

    private boolean isEndOfLine(int c)
    {
            return c == '\n' || c == '\r' || c == -1;
    }

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

}

class FastReader
{
	
    BufferedReader br;
    StringTokenizer st;
 
    public FastReader()
    {
        br = new BufferedReader(new
                 InputStreamReader(System.in));
    }
 
    String next()
    {
        while (st == null || !st.hasMoreElements())
        {
            try
            {
                st = new StringTokenizer(br.readLine());
            }
            catch (IOException  e)
            {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }
 
    int nextInt()
    {
        return Integer.parseInt(next());
    }
 
    long nextLong()
    {
        return Long.parseLong(next());
    }
 
    double nextDouble()
    {
        return Double.parseDouble(next());
    }
 
    String nextLine()
    {
        String str = "";
        try
        {
            str = br.readLine();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
        return str;
    }
}
 
class OutputWriter {
	
	private final PrintWriter writer;
 
	public OutputWriter(OutputStream outputStream)
	{
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}
 
	public OutputWriter(Writer writer)
	{
		this.writer = new PrintWriter(writer);
	}
 
	public void print(Object...objects)
	{
		for (int i = 0; i < objects.length; i++)
		{
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}
 
	public void printLine(Object...objects)
	{
		print(objects);
		writer.println();
	}
 
	public void close()
	{
		writer.close();
	}
 
	public void flush()
	{
		writer.flush();
	}
}