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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int main() {
  long long k = 0, sum_k = 0, s1 = 1, s2 = 0;
  string s;
  cin >> s;
  vector<int> let(26, 0);
  if (s.length() < 4) {
    cout << "No" << endl;
    return 0;
  }
  if (s.length() == 4) {
    if (s[3] == s[2] && s[3] == s[1]) {
      cout << "No" << endl;
      return 0;
    }
    if (s[2] == s[1] && s[2] == s[0]) {
      cout << "No" << endl;
      return 0;
    }
    if (s[3] == s[1] && s[3] == s[0]) {
      cout << "No" << endl;
      return 0;
    }
    if (s[3] == s[0] && s[3] == s[2]) {
      cout << "No" << endl;
      return 0;
    }
    cout << "Yes" << endl;
    return 0;
  }
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == 'a') ++let[0];
    if (s[i] == 'b') ++let[1];
    if (s[i] == 'c') ++let[2];
    if (s[i] == 'd') ++let[3];
    if (s[i] == 'e') ++let[4];
    if (s[i] == 'f') ++let[5];
    if (s[i] == 'g') ++let[6];
    if (s[i] == 'h') ++let[7];
    if (s[i] == 'i') ++let[8];
    if (s[i] == 'j') ++let[9];
    if (s[i] == 'k') ++let[10];
    if (s[i] == 'l') ++let[11];
    if (s[i] == 'm') ++let[12];
    if (s[i] == 'n') ++let[13];
    if (s[i] == 'o') ++let[14];
    if (s[i] == 'p') ++let[15];
    if (s[i] == 'q') ++let[16];
    if (s[i] == 'r') ++let[17];
    if (s[i] == 's') ++let[18];
    if (s[i] == 't') ++let[19];
    if (s[i] == 'u') ++let[20];
    if (s[i] == 'v') ++let[21];
    if (s[i] == 'w') ++let[22];
    if (s[i] == 'x') ++let[23];
    if (s[i] == 'y') ++let[24];
    if (s[i] == 'z') ++let[25];
  }
  for (int i = 0; i < 26; ++i)
    if (let[i] > 0) ++sum_k;
  if (sum_k > 4) {
    cout << "No" << endl;
    return 0;
  }
  if (s.length() > 4 && (sum_k == 4 || sum_k == 3)) {
    cout << "Yes" << endl;
    return 0;
  }
  if (s.length() > 4 && sum_k == 1) {
    cout << "No" << endl;
    return 0;
  }
  if (s.length() > 4 && sum_k == 2) {
    for (int i = 1; i < s.length(); ++i) {
      if (s[i] == s[0])
        ++s1;
      else
        ++s2;
    }
    if (s1 > 1 && s2 > 1) {
      cout << "Yes" << endl;
      return 0;
    } else {
      cout << "No" << endl;
      return 0;
    }
  }
}