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