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