#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  string s1 = "ABC", s2 = "ACB", s3 = "BAC", s4 = "BCA", s5 = "CAB", s6 = "CBA";
  size_t f1 = s.find(s1);
  size_t f2 = s.find(s2);
  size_t f3 = s.find(s3);
  size_t f4 = s.find(s4);
  size_t f5 = s.find(s5);
  size_t f6 = s.find(s6);
  if (f1 != string::npos) {
    cout << "Yes";
  } else if (f2 != string::npos) {
    cout << "Yes";
  } else if (f3 != string::npos) {
    cout << "Yes";
  } else if (f4 != string::npos) {
    cout << "Yes";
  } else if (f5 != string::npos) {
    cout << "Yes";
  } else if (f6 != string::npos) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}
