#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  bool flag = false;
  for (int i = 0; i <= ((int)str.length()) - 3; i++) {
    unordered_map<char, int> hold;
    hold[str[i]]++;
    hold[str[i + 1]]++;
    hold[str[i + 2]]++;
    if (hold['A'] && hold['B'] && hold['C']) {
      flag = true;
      break;
    }
  }
  cout << (flag ? "Yes" : "No") << endl;
}
