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.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.stream.Collectors;

public class Main {

  static int T;
  static int n, k;
  static int[] vals = new int[100005];
  static long[] sums = new long[100005];
  static boolean[] willTake = new boolean[100005];

  public static void main(String[] args) throws Exception {
    FastInput fi = new FastInput(System.in);
//    BufferedWriter writer = new BufferedWriter(new FileWriter("/Users/adityavivek/file.txt"));
    String s = fi.nextString();
    Map<Character, Integer> map = new HashMap<>();
    for (int i = 0; i < s.length(); i++) {
      if (!map.containsKey(s.charAt(i)))
        map.put(s.charAt(i), 1);
      else
        map.put(s.charAt(i), map.get(s.charAt(i)) + 1);
    }
    if (map.size() > 4 || map.size() < 2) {
      System.out.println("No");
    } else if (map.size() == 4) {
      System.out.println("Yes");
    } else if (map.size() == 3) {
      List<Integer> counts = map.values().stream()
          .filter(count -> count > 1)
          .collect(Collectors.toList());
      if (counts.size() > 0) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
    } else if (map.size() == 2) {
      List<Integer> counts = map.values().stream()
          .filter(count -> count > 1)
          .collect(Collectors.toList());
      if (counts.size() == 2) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
    }
  }

  static double calc(double exp) {
    int hi = n, lo = 1;

    while(hi>lo) {
      int mid = (hi + lo)/2;
      if(vals[mid]<exp)
        lo = mid+1;
      else hi = mid;
    }
    double sum = (sums[n]-sums[hi-1])+((hi-1)*exp);
    return sum*(1/((double)n));
  }

  private static class FastInput {

    BufferedReader reader;
    StringTokenizer st;

    public FastInput(InputStream inputStream) {
      reader = new BufferedReader(new InputStreamReader(inputStream), 32768);
    }

    String nextString() {
      while(st == null || !st.hasMoreTokens()) {
        try {
          st = new StringTokenizer(reader.readLine());
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(nextString());
    }

    long nextLong() {
      return Long.parseLong(nextString());
    }
  }

}