#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 10;
char s[maxn];
int f(char ch) {
  if (ch == 'A') return 1;
  if (ch == 'B') return 2;
  if (ch == 'C') return 4;
  return 0;
}
int main() {
  scanf("%s", s + 1);
  int l = strlen(s + 1);
  for (int i = 1; i <= l - 2; ++i) {
    int t = f(s[i]) | f(s[i + 1]) | f(s[i + 2]);
    if (t == 7) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No";
  return 0;
}
