#include <bits/stdc++.h>
using namespace std;
bool is_upper(char a) { return (a > 64 && a < 91); }
bool check(map<char, int> m) {
  m.erase('.');
  if (m.size() < 3) return false;
  for (auto i : m)
    if (i.second == 0) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  bool ans = false;
  string s;
  cin >> s;
  map<char, int> c;
  if (s.length() < 3) {
    cout << "No";
    return 0;
  }
  for (int i = 0; i < 3; i++) c[s[i]]++;
  ans |= check(c);
  for (int i = 3; i < s.length(); i++) {
    c[s[i - 3]]--;
    c[s[i]]++;
    ans |= check(c);
  }
  if (ans)
    cout << "Yes";
  else
    cout << "No";
}
