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