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