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