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;
const long long int MAX = 2e5 + 5;
long long int f[MAX], in[MAX], ifac[MAX];
void fact() {
  f[0] = f[1] = 1;
  for (long long int i = 2; i < MAX; i++) f[i] = (f[i - 1] * i) % 1000000007;
  in[0] = 1, in[1] = 1;
  for (long long int i = 2; i < MAX; i++)
    in[i] = 1000000007 - (1000000007 / i) * in[1000000007 % i] % 1000000007;
  ifac[0] = 1;
  for (long long int i = 1; i < MAX; i++)
    ifac[i] = (in[i] * ifac[i - 1]) % 1000000007;
}
long long int ncr(long long int n, long long int r) {
  if (n < r) return 0;
  return (f[n] * (ifac[n - r] * ifac[r] % 1000000007)) % 1000000007;
}
bool pp(long long int n) {
  if (n < 2) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long int i = 5; i * i <= n; i += 6) {
    if (n % i == 0 || n % (i + 2) == 0) return false;
  }
  return true;
}
long long int hightet_fac(long long int n) {
  for (long long int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      return n / i;
    }
  }
  return 1;
}
void solve() {
  string s;
  cin >> s;
  if (s.size() < 4) {
    cout << "NO"
         << "\n";
    return;
  }
  map<char, long long int> m;
  for (auto x : s) m[x]++;
  if (m.size() == 1 || (m.size() > 4)) {
    cout << "NO"
         << "\n";
    return;
  }
  if (m.size() == 2) {
    long long int mn = 10000000000000007;
    for (auto x : m) mn = min(mn, x.second);
    if (mn == 1) {
      cout << "NO"
           << "\n";
      return;
    }
    cout << "YES"
         << "\n";
    return;
  }
  cout << "YES"
       << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin.exceptions(cin.failbit);
  long long int tc = 1;
  while (tc--) {
    solve();
  }
}