#include <bits/stdc++.h>
using namespace std;
int cnt[107];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ;
  string ss;
  cin >> ss;
  for (int i = 1; i < ss.size() - 1; i++) {
    if (ss[i] == 'A') {
      if (ss[i - 1] == 'B' && ss[i + 1] == 'C' ||
          ss[i - 1] == 'C' && ss[i + 1] == 'B') {
        cout << "Yes\n";
        return 0;
      }
    } else if (ss[i] == 'B') {
      if (ss[i - 1] == 'A' && ss[i + 1] == 'C' ||
          ss[i - 1] == 'C' && ss[i + 1] == 'A') {
        cout << "Yes\n";
        return 0;
      }
    } else if (ss[i] == 'C') {
      if (ss[i - 1] == 'A' && ss[i + 1] == 'B' ||
          ss[i - 1] == 'B' && ss[i + 1] == 'A') {
        cout << "Yes\n";
        return 0;
      }
    }
  }
  cout << "No\n";
  return 0;
}
