#include <bits/stdc++.h>
using namespace std;
long long int n, k;
string str[400007];
long long int a[400007], p[400007][4];
long long int m1[200005], m2[200005];
int main() {
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == 'A') {
      p[i][0] = 1;
      if (i - 1 >= 0) p[i - 1][0] = 1;
      if (i + 1 < s.length()) p[i + 1][0] = 1;
    }
    if (s[i] == 'B') {
      p[i][1] = 1;
      if (i - 1 >= 0) p[i - 1][1] = 1;
      if (i + 1 < s.length()) p[i + 1][1] = 1;
    }
    if (s[i] == 'C') {
      p[i][2] = 1;
      if (i - 1 >= 0) p[i - 1][2] = 1;
      if (i + 1 < s.length()) p[i + 1][2] = 1;
    }
  }
  for (int i = 0; i < s.length(); i++) {
    if (p[i][0] == 1 && p[i][1] == 1 && p[i][2] == 1) {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
  return 0;
}
