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