#include <bits/stdc++.h>
char s[128];
bool ce(char r, char a, char b, char c) { return r == a || r == b || r == c; }
bool spcmp(char a, char b, char c) {
  return ce('A', a, b, c) && ce('B', a, b, c) && ce('C', a, b, c);
}
int main() {
  int n, i;
  scanf("%s", s);
  for (i = 1; s[i + 1] != '\0'; i++) {
    if (spcmp(s[i - 1], s[i], s[i + 1])) {
      printf("Yes\n");
      return 0;
    }
  }
  printf("No\n");
  return 0;
}
