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