#include <bits/stdc++.h>
int main() {
  char str[101];
  scanf("%s", &str);
  char *s1 = strstr(str, "BAC"), *s2 = strstr(str, "ABC"),
       *s3 = strstr(str, "CAB"), *s4 = strstr(str, "ACB"),
       *s5 = strstr(str, "BCA"), *s6 = strstr(str, "CBA");
  if (s1 != NULL || s2 != NULL || s3 != NULL || s4 != NULL || s5 != NULL ||
      s6 != NULL)
    printf("Yes");
  else
    printf("No");
}
