#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int main() {
  cin >> s;
  if (s.size() < 3) {
    cout << "No";
    return 0;
  }
  for (int i = 0; i <= s.size() - 3; ++i) {
    if (s[i] == 'A' && s[i + 1] == 'B' && s[i + 2] == 'C') {
      cout << "Yes";
      return 0;
    } else if (s[i] == 'A' && s[i + 1] == 'C' && s[i + 2] == 'B') {
      cout << "Yes";
      return 0;
    } else if (s[i] == 'B' && s[i + 1] == 'C' && s[i + 2] == 'A') {
      cout << "Yes";
      return 0;
    } else if (s[i] == 'B' && s[i + 1] == 'A' && s[i + 2] == 'C') {
      cout << "Yes";
      return 0;
    } else if (s[i] == 'C' && s[i + 1] == 'A' && s[i + 2] == 'B') {
      cout << "Yes";
      return 0;
    } else if (s[i] == 'C' && s[i + 1] == 'B' && s[i + 2] == 'A') {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
  return 0;
}
