#include <bits/stdc++.h>
using namespace std;
int arr[26];
int main() {
  int a = 0, b = 0, d = 0, c = 0;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    arr[(int)s[i] - 97]++, a++;
  }
  sort(arr, arr + 26, greater<int>());
  if (arr[4] > 0 || arr[1] == 0 || (arr[1] == 1 && arr[2] == 0) ||
      (arr[2] > 0 && a == 3))
    cout << "No";
  else
    cout << "Yes";
  return 0;
}
