#include <bits/stdc++.h>
using namespace std;
bool solve(string str) {
  for (int i = 1; i < str.length() - 1; i++) {
    if (str[i] == 'A' && str[i + 1] == 'B' && str[i - 1] == 'C') return true;
    if (str[i] == 'A' && str[i + 1] == 'C' && str[i - 1] == 'B') return true;
    if (str[i] == 'B' && str[i + 1] == 'A' && str[i - 1] == 'C') return true;
    if (str[i] == 'B' && str[i + 1] == 'C' && str[i - 1] == 'A') return true;
    if (str[i] == 'C' && str[i + 1] == 'B' && str[i - 1] == 'A') return true;
    if (str[i] == 'C' && str[i + 1] == 'A' && str[i - 1] == 'B') return true;
  }
  return false;
}
int main() {
  string str;
  cin >> str;
  if (solve(str))
    cout << "Yes";
  else
    cout << "No";
}
