#include <bits/stdc++.h>
int main() {
  if (fopen("A.in", "r")) {
    freopen("A.in", "r", stdin);
  }
  std::string s;
  std::cin >> s;
  for (int i = 1; i < s.length() - 1; ++i) {
    if ('A' <= s[i - 1] && s[i - 1] <= 'C' && 'A' <= s[i] && s[i] <= 'C' &&
        'A' <= s[i + 1] && s[i + 1] <= 'C' && s[i - 1] != s[i] &&
        s[i - 1] != s[i + 1] && s[i] != s[i + 1]) {
      puts("Yes");
      return 0;
    }
  }
  puts("No");
  return 0;
}
