#include <bits/stdc++.h>
using namespace std;
int freq[1000005];
vector<int> adj[1000005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  if (s.find("ABC") != string::npos || s.find("ACB") != string::npos ||
      s.find("CBA") != string::npos || s.find("BCA") != string::npos ||
      s.find("BAC") != string::npos || s.find("CAB") != string::npos)
    puts("Yes"), exit(0);
  puts("No");
}
