#include <bits/stdc++.h>
using namespace std;
string s;
int main() {
  cin >> s;
  char abc[3] = {'A', 'B', 'C'};
  vector<char> abcv(abc, abc + 3);
  for (int i = 0; i < (int)s.size() - 2; i++) {
    vector<char> cur(s.begin() + i, s.begin() + i + 3);
    sort(cur.begin(), cur.end());
    if (cur == abcv) {
      cout << "Yes" << endl;
      exit(0);
    }
  }
  cout << "No" << endl;
}
