#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int a = s.length();
  if (s.find("ABC") < a || s.find("ACB") < a || s.find("BAC") < a ||
      s.find("BCA") < a || s.find("CAB") < a || s.find("CBA") < a) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}
