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 mod = 1e9 + 7;
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long power(long long a, long long b, long long p) {
  if (a == 0) return 0;
  long long res = 1;
  if (a >= p) a = a % p;
  while (b > 0) {
    if (b & 1) res = (res * a) % p;
    b >>= 1;
    a = (a * a) % p;
  }
  return res;
}
vector<long long> decToBinary(long long n) {
  vector<long long> v;
  for (long long i = 31; i >= 0; i--) {
    long long k = n >> i;
    if (k & 1)
      v.push_back(1);
    else
      v.push_back(0);
  }
  return v;
}
long long binarySearch(long long arr[], long long l, long long r, long long x) {
  if (r >= l) {
    long long mid = l + (r - l) / 2;
    if (arr[mid] == x) return mid;
    if (arr[mid] > x) return binarySearch(arr, l, mid - 1, x);
    return binarySearch(arr, mid + 1, r, x);
  }
  return -1;
}
long long maxResult(long long n, long long a, long long b, long long c) {
  long long maxVal = 0;
  for (long long i = 0; i <= n; i += a)
    for (long long j = 0; j <= n - i; j += b) {
      float z = (float)(n - (i + j)) / c;
      if (floor(z) == ceil(z)) {
        long long x = i / a;
        long long y = j / b;
        maxVal = max(maxVal, x + y + (long long)z);
      }
    }
  return maxVal;
}
void SeiveOfEratosthenes(long long n) {
  bool prime[n + 1];
  vector<long long> v;
  memset(prime, true, sizeof(prime));
  for (long long i = 2; i * i <= n; i++) {
    if (prime[i]) {
      for (long long j = i * i; j <= n; j += i) {
        prime[j] = false;
      }
    }
  }
  for (long long i = 2; i <= n; i++) {
    if (prime[i]) {
      v.push_back(i);
    }
  }
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
void solve() {
  string s;
  cin >> s;
  if (s.size() < 4) {
    cout << "No";
    return;
  }
  set<long long> st;
  map<long long, long long> m;
  for (long long i = 0; i < s.size(); i++) {
    long long x = s[i] - 'a';
    m[x]++;
    st.insert(x);
  }
  long long d = st.size();
  if (d > 4) {
    cout << "No";
    return;
  }
  if (d >= 3) {
    cout << "Yes";
    return;
  }
  if (d == 2) {
    for (auto i : m) {
      if (i.second < 2) {
        cout << "No";
        return;
      }
    }
    cout << "Yes";
    return;
  }
  cout << "No";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
}