#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int n = str.length();
  int arr[n];
  for (int i = 0; i < n; i++) {
    if (str[i] == 'A') {
      arr[i] = 1;
    } else if (str[i] == 'B') {
      arr[i] = 3;
    } else if (str[i] == 'C') {
      arr[i] = 5;
    } else {
      arr[i] = 0;
    }
  }
  int flag = 0;
  for (int i = 0; i < n - 2; i++) {
    if (arr[i] * arr[i + 1] * arr[i + 2] == 15) {
      flag = 1;
    }
  }
  if (flag == 0) {
    cout << "No" << endl;
  } else {
    cout << "Yes" << endl;
  }
}
