#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string input;
  int i, flag = 0;
  cin >> input;
  for (i = 1; i < input.length() - 1 and flag == 0; i++) {
    if (input[i] == 'A' and input[i - 1] == 'B' and input[i + 1] == 'C')
      flag = 1;
    else if (input[i] == 'A' and input[i - 1] == 'C' and input[i + 1] == 'B')
      flag = 1;
    else if (input[i] == 'B' and input[i - 1] == 'A' and input[i + 1] == 'C')
      flag = 1;
    else if (input[i] == 'B' and input[i - 1] == 'C' and input[i + 1] == 'A')
      flag = 1;
    else if (input[i] == 'C' and input[i - 1] == 'A' and input[i + 1] == 'B')
      flag = 1;
    else if (input[i] == 'C' and input[i - 1] == 'B' and input[i + 1] == 'A')
      flag = 1;
  }
  if (flag)
    cout << "Yes\n";
  else
    cout << "No\n";
}
