#include <bits/stdc++.h>
using namespace std;
string checkIfContainsThreeColors(string& str) {
  std::size_t pos = str.find("ABC");
  if (pos != string::npos) {
    return "Yes";
  }
  pos = string::npos;
  pos = str.find("ACB");
  if (pos != string::npos) {
    return "Yes";
  }
  pos = string::npos;
  pos = str.find("BAC");
  if (pos != string::npos) {
    return "Yes";
  }
  pos = string::npos;
  pos = str.find("BCA");
  if (pos != string::npos) {
    return "Yes";
  }
  pos = string::npos;
  pos = str.find("CAB");
  if (pos != string::npos) {
    return "Yes";
  }
  pos = string::npos;
  pos = str.find("CBA");
  if (pos != string::npos) {
    return "Yes";
  }
  return "No";
}
int main() {
  string str;
  cin >> str;
  string res = checkIfContainsThreeColors(str);
  cout << res << endl;
  return 0;
}
