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;
char s[100011];
int f[1111], id[1111];
bool dp[100011][3][3][5][5];
bool chk() {
  int cnt = 0, len = strlen(s);
  memset(f, 0, sizeof f);
  for (int i = 0; i < len; i++) {
    s[i] -= 'a';
    if (!f[s[i]]) cnt++;
    f[s[i]]++;
  }
  if (len < 4) return false;
  if (cnt < 2 || cnt > 4) return false;
  if (cnt == 3 || cnt == 4) return true;
  if (cnt == 2) {
    int x = -1;
    for (int i = 0; i < 26 && x < 0; i++)
      if (f[i] > 0) x = f[i];
    if (x == 1 || x == len - 1) return false;
    return true;
  }
  memset(id, 0, sizeof id);
  int idn = 0;
  for (int i = 0; i < 26; i++)
    if (f[s[i]] > 0 && !id[s[i]]) {
      id[s[i]] = ++idn;
    }
  for (int i = 0; i < len; i++) s[i] = id[s[i]];
  memset(dp, false, sizeof dp);
  dp[0][1][0][s[0]][0] = true;
  dp[0][0][1][0][s[0]] = true;
  for (int i = 1; i < len; i++)
    for (int j = 0; j <= 2; j++)
      for (int k = 0; k <= 2; k++)
        for (int x = 0; x <= idn; x++)
          for (int y = 0; y <= idn; y++) {
            if (!dp[i - 1][j][k][x][y]) continue;
            if (s[i] == x || s[i] == y) dp[i][j][k][x][y] = true;
            if (j < 2 && s[i] != x) dp[i][j + 1][k][s[i]][y] = true;
            if (k < 2 && s[i] != y) dp[i][j][k + 1][x][s[i]] = true;
          }
  for (int x = 1; x <= idn; x++)
    for (int y = 1; y <= idn; y++)
      if (dp[len - 1][2][2][x][y]) return true;
  return false;
}
int main() {
  scanf("%s", s);
  puts(chk() ? "Yes" : "No");
  return 0;
}