#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[101];
  cin >> s;
  int l = strlen(s);
  int i;
  l = l - 1;
  for (i = 1; i < l; i++) {
    int c = i + 1;
    if (s[i - 1] == 'A' && s[i] == 'B' && s[c] == 'C') {
      cout << "Yes";
      return 0;
    }
    if (s[i - 1] == 'A' && s[i] == 'C' && s[c] == 'B') {
      cout << "Yes";
      return 0;
    }
    if (s[i - 1] == 'B' && s[i] == 'A' && s[c] == 'C') {
      cout << "Yes";
      return 0;
    }
    if (s[i - 1] == 'B' && s[i] == 'C' && s[c] == 'A') {
      cout << "Yes";
      return 0;
    }
    if (s[i - 1] == 'C' && s[i] == 'B' && s[c] == 'A') {
      cout << "Yes";
      return 0;
    }
    if (s[i - 1] == 'C' && s[i] == 'A' && s[c] == 'B') {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
  return 0;
}
