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