#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  map<char, int> cnt;
  if (s.size() > 2)
    for (int i = 1; i <= s.size() - 2; i++) {
      cnt.clear();
      cnt[s[i - 1]]++;
      cnt[s[i]]++;
      cnt[s[i + 1]]++;
      if (cnt['A'] == 1 && cnt['B'] == 1 && cnt['C'] == 1) {
        cout << "Yes\n";
        return 0;
      }
    }
  cout << "No\n";
  return 0;
}
