#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  if (s.length() < 3) {
    cout << "No";
    return 0;
  }
  int i;
  for (i = 0; i < s.length() - 2; i++)
    if (s.substr(i, 3) == "ABC" || s.substr(i, 3) == "ACB" ||
        s.substr(i, 3) == "BAC" || s.substr(i, 3) == "BCA" ||
        s.substr(i, 3) == "CAB" || s.substr(i, 3) == "CBA") {
      cout << "Yes";
      return 0;
    }
  cout << "No";
  return 0;
}
